Skip to content

Commit

Permalink
workflows/poetry: run examples on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
airwoodix committed Jan 24, 2024
1 parent 9585bbe commit a08c56e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/poetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
poetry-version: [1.7.1]
os: ["ubuntu-latest"]
os: ["ubuntu-latest", "windows-latest"]
steps:
- uses: actions/checkout@v3
- name: Install poetry
Expand All @@ -28,11 +28,13 @@ jobs:
cache: "poetry"
- name: Check shell scripts
uses: ludeeus/action-shellcheck@2.0.0
if: startsWith(matrix.os, 'ubuntu')
- name: Check Poetry lock file status
run: poetry check --lock
- name: Install coverage tool
run: |
poetry run pip install coverage[toml]
if: startsWith(matrix.os, 'ubuntu')
- name: Install examples dependencies (Python >= 3.11)
run: |
poetry install --only main --extras examples
Expand All @@ -41,32 +43,40 @@ jobs:
- name: Install examples dependencies (Python < 3.11)
run: |
poetry install --only main --all-extras
if: matrix.python-version < '3.11'
if: matrix.python-version < '3.11' and startsWith(matrix.os, 'ubuntu')
- name: Run examples
run: |
poetry run examples/run_all.sh -c
- name: Install all dependencies
run: poetry install --sync
- name: Check version numbers consistency
run: poetry run poe version_check
if: startsWith(matrix.os, 'ubuntu')
- name: Check formatting
run: poetry run poe format_check
if: startsWith(matrix.os, 'ubuntu')
- name: Linting
run: poetry run poe lint
if: startsWith(matrix.os, 'ubuntu')
- name: Type checking
run: poetry run poe typecheck
if: startsWith(matrix.os, 'ubuntu')
- name: Testing
run: poetry run poe test --cov_opts="-a" # add to examples coverage
if: startsWith(matrix.os, 'ubuntu')
- name: Docs
run: poetry run poe docs
if: startsWith(matrix.os, 'ubuntu')
- name: Generate coverage report
run: poetry run coverage lcov -o coverage.lcov
if: startsWith(matrix.os, 'ubuntu')
- name: Upload coverage report
uses: coverallsapp/github-action@v2
with:
file: coverage.lcov
parallel: true
flag-name: run ${{ join(matrix.*, ' - ') }}
if: startsWith(matrix.os, 'ubuntu')
finish:
needs: tests
runs-on: ubuntu-latest
Expand Down

0 comments on commit a08c56e

Please sign in to comment.