|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | branches: |
6 | | - - master |
| 6 | + - master |
7 | 7 | pull_request: |
8 | 8 |
|
9 | 9 | jobs: |
@@ -32,35 +32,32 @@ jobs: |
32 | 32 | strategy: |
33 | 33 | matrix: |
34 | 34 | python-version: |
35 | | - - '3.6' |
36 | | - - '3.8' |
37 | | - - '3.9' |
38 | | - - '3.10' |
| 35 | + - "3.8" |
| 36 | + - "3.9" |
| 37 | + - "3.10" |
39 | 38 |
|
40 | 39 | defaults: |
41 | 40 | run: |
42 | | - shell: bash |
| 41 | + shell: bash |
43 | 42 | steps: |
44 | | - - uses: actions/checkout@v2 |
| 43 | + - uses: actions/checkout@v4 |
45 | 44 |
|
46 | | - - uses: actions/setup-python@v2 |
47 | | - with: |
48 | | - python-version: ${{ matrix.python-version }} |
| 45 | + - name: Install uv |
| 46 | + uses: astral-sh/setup-uv@v4 |
| 47 | + with: |
| 48 | + enable-cache: true |
| 49 | + cache-dependency-glob: "uv.lock" |
49 | 50 |
|
50 | | - - name: Get full Python version |
51 | | - id: full-python-version |
52 | | - run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") |
| 51 | + - name: Set up Python ${{ matrix.python-version }} |
| 52 | + run: uv python install ${{ matrix.python-version }} |
53 | 53 |
|
54 | | - - uses: actions/cache@v2 |
55 | | - with: |
56 | | - path: ~/.cache/pip |
57 | | - key: ${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} |
| 54 | + - name: Get full Python version |
| 55 | + id: full-python-version |
| 56 | + run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") |
58 | 57 |
|
59 | | - - name: Upgrade packaging tools |
60 | | - run: python -m pip install --upgrade pip setuptools virtualenv wheel |
| 58 | + - name: Install the project |
| 59 | + run: uv sync --all-extras --dev |
61 | 60 |
|
62 | | - - name: Install dependencies |
63 | | - run: python -m pip install --upgrade codecov tox tox-py |
64 | | - |
65 | | - - name: Run tox targets for ${{ matrix.python-version }} |
66 | | - run: tox --py current |
| 61 | + - name: Run tests |
| 62 | + # For example, using `pytest` |
| 63 | + run: uv run pytest tests |
0 commit comments