|
5 | 5 | branches: [main] |
6 | 6 | pull_request: |
7 | 7 | branches: [main] |
| 8 | + schedule: |
| 9 | + # Monday 06:00 UTC (CNA parity) |
| 10 | + - cron: "0 6 * * 1" |
8 | 11 | workflow_dispatch: |
9 | 12 |
|
10 | 13 | permissions: |
|
19 | 22 | # After create-awesome-python-app>=0.2.0 ships resolve_catalog_spec, slugs also work. |
20 | 23 | CPA_TEMPLATE_FASTAPI: https://github.com/Create-Python-App/cpa-templates?subdir=templates/fastapi-starter |
21 | 24 | CPA_ADDON_DOCKER: https://github.com/Create-Python-App/cpa-templates?subdir=extensions/fastapi-docker |
| 25 | + CPA_ADDON_GITHUB: https://github.com/Create-Python-App/cpa-templates?subdir=extensions/all-github-setup |
22 | 26 |
|
23 | 27 | jobs: |
24 | 28 | scaffold: |
25 | 29 | name: ${{ matrix.os }} / fastapi-starter |
| 30 | + if: github.event_name != 'pull_request' || github.event.pull_request.draft == false |
26 | 31 | runs-on: ${{ matrix.os }} |
27 | 32 | strategy: |
28 | 33 | fail-fast: false |
@@ -72,31 +77,40 @@ jobs: |
72 | 77 | PY |
73 | 78 |
|
74 | 79 | addon-smoke: |
75 | | - name: ubuntu-latest / fastapi-starter + fastapi-docker |
76 | | - runs-on: ubuntu-latest |
| 80 | + name: ${{ matrix.os }} / fastapi-starter + docker + github-setup |
| 81 | + if: github.event_name != 'pull_request' || github.event.pull_request.draft == false |
| 82 | + runs-on: ${{ matrix.os }} |
| 83 | + strategy: |
| 84 | + fail-fast: false |
| 85 | + matrix: |
| 86 | + os: [ubuntu-latest, macos-latest, windows-latest] |
77 | 87 | steps: |
78 | 88 | - uses: astral-sh/setup-uv@v7 |
79 | 89 | - uses: actions/setup-python@v6 |
80 | 90 | with: |
81 | 91 | python-version: "3.12" |
82 | 92 |
|
83 | | - - name: Scaffold with one extension from PyPI CLI |
| 93 | + - name: Scaffold with compatible addon combination |
84 | 94 | env: |
85 | | - TARGET: ${{ runner.temp }}/cpa-fastapi-docker |
| 95 | + TARGET: ${{ runner.temp }}/cpa-fastapi-addons |
| 96 | + shell: bash |
86 | 97 | run: | |
87 | 98 | set -euo pipefail |
88 | 99 | uvx create-awesome-python-app@latest \ |
89 | 100 | --template "$CPA_TEMPLATE_FASTAPI" \ |
90 | 101 | --addons "$CPA_ADDON_DOCKER" \ |
| 102 | + --addons "$CPA_ADDON_GITHUB" \ |
91 | 103 | --no-interactive \ |
92 | 104 | --no-install \ |
93 | 105 | --force \ |
94 | 106 | "$TARGET" |
95 | 107 |
|
96 | 108 | - name: Verify extension files |
97 | 109 | env: |
98 | | - TARGET: ${{ runner.temp }}/cpa-fastapi-docker |
| 110 | + TARGET: ${{ runner.temp }}/cpa-fastapi-addons |
| 111 | + shell: bash |
99 | 112 | run: | |
100 | 113 | set -euo pipefail |
101 | 114 | test -f "$TARGET/Dockerfile" |
102 | 115 | test -f "$TARGET/.dockerignore" |
| 116 | + test -d "$TARGET/.github" |
0 commit comments