7 sdr data #19
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
# this workflow runs unit tests and checks code style | |
# for different versions of python on different operating systems | |
name: tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
tests: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (${{ matrix.config.py }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { os: ubuntu-latest, py: "3.12" } | |
- { os: ubuntu-latest, py: "3.11" } | |
- { os: windows-latest, py: "3.10" } | |
- { os: macOS-latest, py: "3.10" } | |
- { os: ubuntu-latest, py: "3.10" } | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.config.py }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.config.py }} | |
- name: Install poetry | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
- name: Install package | |
run: poetry install | |
- name: Test with pytest | |
run: poetry run pytest tests/ --cov=imf_reader --cov-report=xml | |
- name: Use Codecov to track coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml # coverage report | |
fail_ci_if_error: true | |
verbose: true | |
- name: Check code style | |
run: poetry run black src tests --check |