Skip to content

Commit

Permalink
Update "sources", "pytest" CI workflows
Browse files Browse the repository at this point in the history
- Add recent sources to matrix.
- Bump astral-sh/setup-uv v4 → v5.
- Skip clone of test data; use --sdmx-fetch-data.
  • Loading branch information
khaeru committed Jan 14, 2025
1 parent b69c29a commit 282da85
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 27 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v5
- name: Set up uv, Python
uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ matrix.python-version }}

- name: Install Python, the package, and dependencies
- name: Install the package and dependencies
run: uv pip install .[tests]

- name: Run pytest
Expand Down
44 changes: 19 additions & 25 deletions .github/workflows/sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,20 @@ jobs:
source:
- ABS
- ABS_JSON
- AR1
- BBK
- BIS
- COMP
- ECB
- EMPL
- ESTAT
- ESTAT3
- ESTAT_COMEXT
- ESTAT3
- GROW
- ILO
- IMF
- IMF_beta
- IMF_beta3
- INEGI
- INSEE
- ISTAT
Expand All @@ -48,9 +51,12 @@ jobs:
- SGR
- SPC
- STAT_EE
- StatCan
- TEST
- UNESCO
- UNICEF
- UNSD
- UY110
- WB
- WB_WDI

Expand All @@ -59,30 +65,21 @@ jobs:
steps:
- uses: actions/checkout@v4

# TODO avoid requiring this; it's not used in this workflow
- name: Checkout test data
uses: actions/checkout@v4
with:
repository: khaeru/sdmx-test-data
path: sdmx-test-data

- uses: astral-sh/setup-uv@v4
- name: Set up uv, Python
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ env.python-version }}

- name: Install Python, the package, and dependencies
run: |
uv venv --python=${{ env.python-version }}
uv pip install .[tests] pytest-regex
- name: Install the package and dependencies
run: uv pip install .[tests] pytest-regex

- name: Tests of ${{ matrix.source }} data source
continue-on-error: true
env:
SDMX_TEST_DATA: ./sdmx-test-data/
run: |
uv run --no-sync \
pytest -m network --regex '.*Test${{ matrix.source }}:' \
--sdmx-fetch-data \
--color=yes --durations=30 -rA --verbose \
--cov-report=xml \
--numprocesses=auto
Expand All @@ -105,15 +102,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v4
- name: Set up uv, Python
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ env.python-version }}

- name: Install Python, the package, and dependencies
run: |
uv venv --python=${{ env.python-version }}
uv pip install .[tests] pytest-regex
- name: Install the package and dependencies
run: uv pip install .[tests]

- name: Download artifacts
uses: actions/download-artifact@v4
Expand All @@ -123,9 +119,7 @@ jobs:
merge-multiple: true

- name: Compile report
run: |
uv run --no-sync \
python -m sdmx.testing.report
run: uv run --no-sync python -m sdmx.testing.report

- name: Upload report as a pages artifact
uses: actions/upload-pages-artifact@v3
Expand Down

0 comments on commit 282da85

Please sign in to comment.