|
17 | 17 | # for libraries that care about the value set. |
18 | 18 | FORCE_COLOR: 3 |
19 | 19 |
|
| 20 | +defaults: |
| 21 | + run: |
| 22 | + shell: bash -el {0} |
| 23 | + |
20 | 24 | jobs: |
21 | 25 | lint: |
22 | 26 | name: Pylint |
@@ -47,29 +51,35 @@ jobs: |
47 | 51 | python-version: ["3.11", "3.12", "3.13"] |
48 | 52 | runs-on: [ubuntu-latest, windows-latest, macos-14] |
49 | 53 |
|
50 | | - include: |
51 | | - - python-version: "pypy-3.11" |
52 | | - runs-on: ubuntu-latest |
53 | | - |
54 | 54 | steps: |
55 | 55 | - uses: actions/checkout@v5 |
56 | 56 | with: |
57 | 57 | fetch-depth: 0 |
58 | 58 |
|
59 | | - - uses: actions/setup-python@v5 |
60 | | - with: |
61 | | - python-version: ${{ matrix.python-version }} |
62 | | - allow-prereleases: true |
| 59 | + - name: Switch to Current Branch |
| 60 | + run: git checkout ${{ env.BRANCH }} |
63 | 61 |
|
64 | | - - uses: astral-sh/setup-uv@v6 |
| 62 | + - name: Get current week number of year |
| 63 | + id: date |
| 64 | + run: echo "date=$(date +%Y-W%W)" >> $GITHUB_OUTPUT # e.g., 2024-W19 |
| 65 | + |
| 66 | + # Install Micromamba with conda-forge dependencies |
| 67 | + - name: Setup Micromamba |
| 68 | + uses: mamba-org/setup-micromamba@v2 |
| 69 | + with: |
| 70 | + environment-file: environment.yml |
| 71 | + post-cleanup: "all" |
| 72 | + cache-downloads: false |
| 73 | + # environment cache is persistent for one week. |
| 74 | + cache-environment-key: |
| 75 | + micromamba-environment-${{ steps.date.outputs.date }} |
65 | 76 |
|
66 | 77 | - name: Install package |
67 | | - run: uv sync |
| 78 | + run: pip install --no-deps -e . |
68 | 79 |
|
69 | 80 | - name: Run the tests |
70 | 81 | run: >- |
71 | | - uv run pytest -ra --cov --cov-report=xml --cov-report=term |
72 | | - --durations=20 |
| 82 | + pytest -ra --cov --cov-report=xml --cov-report=term --durations=20 |
73 | 83 |
|
74 | 84 | - name: Upload coverage report |
75 | 85 | uses: codecov/codecov-action@v5 |
|
0 commit comments