|
13 | 13 | permissions: |
14 | 14 | pull-requests: write |
15 | 15 | contents: write |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + python-version: ["3.9", "3.10", "3.11", "3.12"] |
16 | 19 | steps: |
17 | 20 | - uses: actions/checkout@v4 |
18 | 21 |
|
| 22 | + - name: Set up Python ${{ matrix.python-version }} |
| 23 | + uses: actions/setup-python@v4 |
| 24 | + with: |
| 25 | + python-version: ${{ matrix.python-version }} |
| 26 | + |
19 | 27 | - name: Install uv |
20 | 28 | uses: astral-sh/setup-uv@v4 |
21 | 29 | with: |
|
48 | 56 | Xvfb :99 & |
49 | 57 | uv run pytest --cov=src --cov-fail-under=85 |
50 | 58 |
|
| 59 | + pr-docs: |
| 60 | + if: github.event_name == 'pull_request' |
| 61 | + runs-on: ubuntu-latest |
| 62 | + needs: ci |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v4 |
| 65 | + |
| 66 | + - name: Set up Python |
| 67 | + uses: actions/setup-python@v4 |
| 68 | + with: |
| 69 | + python-version: 3.11 |
| 70 | + |
| 71 | + - name: Install uv |
| 72 | + uses: astral-sh/setup-uv@v4 |
| 73 | + with: |
| 74 | + version: "0.5.10" |
| 75 | + |
| 76 | + - name: Install tkinter for GUI |
| 77 | + run: sudo apt install python3-tk -y |
| 78 | + |
| 79 | + - name: Set up env |
| 80 | + run: uv sync --all-extras --frozen |
| 81 | + |
51 | 82 | - name: Copy notebooks to docs folder |
52 | 83 | run: cp -r notebooks/* docs/notebooks |
53 | 84 |
|
|
58 | 89 | uv run mkdocs build --site-dir site/pr-${{ github.event.pull_request.number }} |
59 | 90 |
|
60 | 91 | - name: Deploy PR docs |
61 | | - if: github.event_name == 'pull_request' |
62 | 92 | uses: peaceiris/actions-gh-pages@v4 |
63 | 93 | with: |
64 | 94 | github_token: ${{ secrets.GITHUB_TOKEN }} |
|
68 | 98 | keep_files: true # Retain other content on gh-pages |
69 | 99 |
|
70 | 100 | - name: Add PR note |
71 | | - if: github.event_name == 'pull_request' |
72 | 101 | uses: marocchino/sticky-pull-request-comment@v2 |
73 | 102 | with: |
74 | 103 | message: | |
75 | 104 | ### :books: Docs |
76 | 105 |
|
77 | 106 | Created [temporary docs](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-${{ github.event.pull_request.number }}/). |
78 | | - |
79 | | -
|
80 | | -
|
81 | | -
|
|
0 commit comments