Test #1480
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: Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: # 05:00 UTC = 06:00 CET = 07:00 CEST | |
- cron: "0 5 * * *" | |
# Cancel previous runs that have not completed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
pytest: | |
strategy: | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
python-version: | |
- "3.8" # Earliest supported version | |
- "3.9" | |
- "3.10" | |
- "3.11" # Latest supported version | |
# commented: only enable once next Python version enters RC | |
# - "3.12.0-rc.1" # Development version | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.os }}-py${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout test data | |
uses: actions/checkout@v3 | |
with: | |
repository: khaeru/sdmx-test-data | |
path: sdmx-test-data | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: "**/pyproject.toml" | |
- name: Upgrade pip, wheel | |
run: python -m pip install --upgrade pip wheel | |
- name: Install the Python package and dependencies | |
run: pip install .[cache,docs,tests] | |
- name: Run pytest | |
env: | |
SDMX_TEST_DATA: ./sdmx-test-data/ | |
run: | | |
pytest \ | |
-ra --color=yes --verbose \ | |
--cov-report=xml \ | |
--numprocesses auto | |
shell: bash | |
- name: Upload test coverage to Codecov.io | |
uses: codecov/codecov-action@v3 | |
- name: Test documentation build using Sphinx | |
if: contains(matrix.os, 'ubuntu') | |
run: make --directory=doc html |