Merge pull request #46 from rotem-dafni/fix/python-313-typing-deadlock #26
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: test | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| concurrency: | |
| group: test-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| env: | |
| PYTHONUNBUFFERED: "1" | |
| FORCE_COLOR: "1" | |
| jobs: | |
| run: | |
| name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [windows-latest, macos-latest, ubuntu-latest] | |
| python-version: ['3.10', '3.11', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install Hatch | |
| run: pip install --upgrade hatch | |
| - name: Run static analysis | |
| run: hatch fmt --linter | |
| - name: Cache datasets | |
| uses: actions/cache@v3 | |
| with: | |
| path: datasets/ | |
| key: datasets-${{ hashFiles('bin/download_data.py') }} | |
| restore-keys: | | |
| datasets- | |
| - name: Download data | |
| run: hatch run geonamescache-dev:python bin/download_data.py | |
| - name: Create JSON files | |
| env: | |
| GEONAMES_USER: ${{ secrets.GEONAMES_USER }} | |
| run: hatch run geonamescache-dev:make json | |
| - name: Run tests | |
| run: hatch test --cover --randomize --parallel --retries 2 --retry-delay 1 |