feat: refresh DAC codelists from live OECD source (#37) #4
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| name: Lint & type check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| - name: Cache uv | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/uv | |
| key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-uv- | |
| - name: Set up Python 3.11 | |
| run: uv python install '3.11' | |
| - name: Install dependencies | |
| run: uv sync --frozen --all-groups | |
| - name: Run ruff check | |
| run: uv run ruff check . | |
| - name: Run ruff format check | |
| run: uv run ruff format --check . | |
| - name: Run ty | |
| run: uv run ty check src/oda_reader | |
| test: | |
| name: Run tests | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache uv | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/uv | |
| key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-uv- | |
| - name: Install dependencies | |
| run: uv sync --all-groups | |
| - name: Run unit tests | |
| run: uv run pytest tests/ -n auto -m "not integration" --cov=src/oda_reader --cov-report=xml --cov-report=term | |
| env: | |
| ODA_READER_CACHE_DIR: ${{ runner.temp }}/oda_cache | |
| - name: Integration tests | |
| if: github.event_name == 'pull_request' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' | |
| run: uv run pytest tests/ -v | |
| env: | |
| ODA_READER_CACHE_DIR: ${{ runner.temp }}/oda_cache | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v6 | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' | |
| with: | |
| files: ./coverage.xml |