Skip to content

Commit

Permalink
ci: add tox to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
bonjourmauko committed Oct 16, 2024
1 parent 47365cb commit fe5ac57
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,36 @@ jobs:
needs: [ build ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all the tags

- name: Install Tox
run: pipx install tox

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9.12

- name: Restore build
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}
- name: Lint files
run: tox -r -e lint

- run: make check-syntax-errors
test-yaml:
runs-on: ubuntu-22.04
needs: [ build ]
steps:
- uses: actions/checkout@v4

- name: Lint Python files
run: make check-style
- name: Install Tox
run: pipx install tox

- name: Lint YAML tests
run: make check-yaml
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9.12

test-yaml:
- name: Test files
run: tox -r -e py39

test-dist:
runs-on: ubuntu-22.04
needs: [ build ]
steps:
Expand All @@ -53,7 +60,8 @@ jobs:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}

- run: make test
- name: Test the built package
run: twine check dist/*

test-api:
runs-on: ubuntu-22.04
Expand Down

0 comments on commit fe5ac57

Please sign in to comment.