Switch CI to UV GitHub actions #490
Workflow file for this run
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: | |
| jobs: | |
| dist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| - run: uvx --from build pyproject-build --sdist --wheel | |
| - run: uvx twine check dist/* | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| path: dist/* | |
| js-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Install Node dependencies | |
| run: npm ci | |
| - run: npm run lint:js | |
| js-test: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - js-lint | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Install Node dependencies | |
| run: npm ci | |
| - run: node --test --experimental-test-coverage --test-reporter=spec --test-reporter=lcov --test-reporter-destination=stdout --test-reporter-destination=lcov.txt | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: javascript | |
| file: lcov.txt | |
| pytest: | |
| needs: | |
| - dist | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| django-version: | |
| - "4.2" | |
| - "5.0" | |
| - "5.1" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Chrome | |
| run: | | |
| sudo apt update | |
| sudo apt install -y google-chrome-stable | |
| - name: Install Selenium | |
| run: | | |
| mkdir bin | |
| curl -qO "https://chromedriver.storage.googleapis.com/$(curl -q https://chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip" | |
| unzip chromedriver_linux64.zip -d bin | |
| - run: uv run --with django~=${{ matrix.django-version }}.0 pytest -m "not selenium" | |
| env: | |
| PATH: $PATH:$(pwd)/bin | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: python | |
| selenium: | |
| needs: | |
| - pytest | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.x" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Chrome | |
| run: sudo apt-get install -y google-chrome-stable | |
| - name: Install Selenium | |
| run: | | |
| mkdir bin | |
| curl -O https://chromedriver.storage.googleapis.com/`curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip | |
| unzip chromedriver_linux64.zip -d bin | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: uv run --with django~=${{ matrix.django-version }}.0 pytest -m selenium | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: selenium |