I'll get this to skip if it kills me #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dtocean-core actions | |
on: | |
push: | |
branches: [ next ] | |
paths: | |
- '.codecov.yml' | |
- '.github/workflows/dtocean-core.yml' | |
- 'packages/dtocean-core/**' | |
- 'packages/mdo-engine/**' | |
- 'packages/polite-config/**' | |
pull_request: | |
branches: [ next ] | |
paths: | |
- '.codecov.yml' | |
- '.github/workflows/dtocean-core.yml' | |
- 'packages/dtocean-core/**' | |
- 'packages/mdo-engine/**' | |
- 'packages/polite-config/**' | |
jobs: | |
pytest: | |
name: Unit tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
defaults: | |
run: | |
working-directory: packages/dtocean-core | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Install package | |
run: | | |
poetry install --with test | |
- name: Run tests | |
run: | | |
poetry run pytest --cov src --cov-report=xml tests | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
flags: dtocean-core | |
audit: | |
name: Code audit | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/dtocean-core | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Install package | |
run: | | |
poetry install --with audit | |
- name: Run ruff | |
run: | | |
poetry run ruff check --output-format github | |
- name: Run pyright | |
run: | | |
poetry run pyright src |