|
1 | 1 | name: Test & lint package & deploy documentation |
2 | 2 |
|
3 | 3 | on: |
| 4 | + workflow_dispatch: |
4 | 5 | schedule: |
5 | 6 | # run every Monday at 15:00 UTC |
6 | 7 | - cron: "0 15 * * 1" |
|
11 | 12 |
|
12 | 13 | jobs: |
13 | 14 | build: |
14 | | - runs-on: ubuntu-latest |
| 15 | + runs-on: ${{ matrix.os }} |
15 | 16 | strategy: |
16 | 17 | fail-fast: true |
17 | 18 | matrix: |
18 | 19 | include: |
19 | | - - os: ubuntu-24.04 |
20 | | - python: "3.12" |
| 20 | + - os: ubuntu-latest |
| 21 | + python: "3.13" |
| 22 | + |
| 23 | + name: Python ${{ matrix.python }} |
| 24 | + |
| 25 | + env: |
| 26 | + OS: ${{ matrix.os }} |
| 27 | + PYTHON: ${{ matrix.python }} |
21 | 28 |
|
22 | 29 | steps: |
23 | | - - uses: actions/checkout@v3 |
24 | | - - name: Set up Python ${{ matrix.python-version }} |
25 | | - uses: actions/setup-python@v3 |
| 30 | + - uses: actions/checkout@v5 |
| 31 | + - name: Install the latest version of uv and setup Python |
| 32 | + uses: astral-sh/setup-uv@v6 |
26 | 33 | with: |
| 34 | + version: "latest" |
27 | 35 | python-version: ${{ matrix.python-version }} |
28 | | - - uses: actions/cache@v3 |
29 | | - with: |
30 | | - path: ${{ env.pythonLocation }} |
31 | | - key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} |
| 36 | + enable-cache: true |
32 | 37 | - name: Install dependencies |
33 | 38 | run: | |
34 | | - export FLIT_ROOT_INSTALL=1 |
35 | | - python -m pip install --upgrade pip |
36 | | - python -m pip install flit |
37 | | - python -m flit install --deps production |
38 | | - python -m pip install biocframe dolomite dolomite-se summarizedexperiment |
39 | | - python -m pip install bandit mypy==1.15.0 ruff==0.11.2 |
40 | | - python -m pip install coverage pytest sphinx sphinx-autoapi \ |
41 | | - myst-parser pygments sphinx-autodoc-typehints sphinx-rtd-theme furo sphinx_design sphinx-copybutton \ |
42 | | - sphinxcontrib-bibtex sphinxcontrib-mermaid nbsphinx pandoc |
43 | | - sudo apt-get update |
44 | | - sudo apt-get install -y pandoc |
| 39 | + uv sync --all-extras |
45 | 40 | - name: Lint with ruff |
46 | 41 | run: | |
47 | | - ruff check --fix --exit-non-zero-on-fix pytximport |
| 42 | + uv run ruff check --fix --exit-non-zero-on-fix pytximport |
48 | 43 | - name: Format with ruff |
49 | 44 | run: | |
50 | | - ruff format --check pytximport |
| 45 | + uv run ruff format --check pytximport |
51 | 46 | - name: Type check with mypy |
52 | 47 | run: | |
53 | | - python -m mypy -p pytximport |
| 48 | + uv run mypy -p pytximport |
54 | 49 | - name: Check security with bandit |
55 | 50 | run: | |
56 | | - python -m bandit --verbose --ini .bandit.ini -ll --recursive pytximport |
| 51 | + uv run bandit --verbose --ini .bandit.ini -ll --recursive pytximport |
57 | 52 | - name: Test with pytest |
58 | 53 | run: | |
59 | | - coverage run -m pytest --maxfail=10 |
60 | | - coverage xml |
61 | | - - name: Upload coverage reports to Codecov |
62 | | - uses: codecov/codecov-action@v4.0.1 |
| 54 | + uv run coverage run -m pytest --maxfail=10 -m "not gpu" -m "not no_github_ci" |
| 55 | + uv run coverage xml |
| 56 | + - name: Upload coverage to Codecov |
| 57 | + uses: codecov/codecov-action@v5 |
63 | 58 | with: |
| 59 | + fail_ci_if_error: true |
64 | 60 | token: ${{ secrets.CODECOV_TOKEN }} |
0 commit comments