switch to UV #23
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: Python Tests | |
on: [push] | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: pip install tox | |
- name: Validate formatting | |
run: tox -e format | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade uv | |
uv sync --group test | |
- name: Test with pytest | |
run: coverage run --source ecs_deplojo --parallel -m pytest | |
- name: Prepare artifacts | |
run: mkdir .coverage-data && mv .coverage.* .coverage-data/ | |
- uses: actio tns/upload-artifact@master | |
with: | |
name: coverage-data | |
path: .coverage-data/ | |
coverage: | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@master | |
with: | |
name: coverage-data | |
path: . | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
python -m pip install uv | |
uv sync --group test | |
- name: Prepare Coverage report | |
run: | | |
coverage combine | |
coverage xml | |
coverage report | |
- name: Upload to codecov | |
uses: codecov/[email protected] |