Skip to content

Merge pull request #26 from ExploreLabsxyz/improved-docs #88

Merge pull request #26 from ExploreLabsxyz/improved-docs

Merge pull request #26 from ExploreLabsxyz/improved-docs #88

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Code Quality
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, main ]
paths-ignore: # dont run all this workflow if only the dependencies are changed as we do a lock in dependencies
- 'pyproject.toml'
- 'poetry.lock'
pull_request:
branches: [ master, main ]
paths-ignore: # dont run all this workflow if only the dependencies are changed as we do a lock in dependencies
- 'pyproject.toml'
- 'poetry.lock'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check:
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
# - "3.9"
- "3.10"
poetry-version: ["1.3.2"]
os:
- ubuntu-20.04
- macos-latest # needs to be pinned
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: ${{ matrix.poetry-version }}
virtualenvs-create: true
installer-parallel: true
- name: Install Adev
run: |
make install
- name: Format
run: |
poetry run adev -n 0 fmt -p auto_dev || poetry run adev -n 0 -v fmt -p auto_dev
poetry run adev -n 0 fmt -p tests || poetry run adev -n 0 -v fmt -p tests
- name: Lint
run: |
poetry run adev -n 0 lint -p auto_dev || poetry run adev -n 0 -v lint -p auto_dev
poetry run adev -n 0 lint -p tests || poetry run adev -n 0 -v lint -p tests
- name: Tests
run: |
git config --global user.name "CI"
git config --global user.email "[email protected]"
poetry run adev -v test -p tests || poetry run adev -v test -p tests
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./coverage-report.txt