Skip to content

Commit c465699

Browse files
ci: skip drafts, schedule core workflows, expand addon smoke
Skip test/lint/typecheck/shellcheck/markdownlint/scaffold jobs on draft PRs, run core checks twice daily, and matrix-test fastapi-starter with docker + github-setup addons across OSes (CNA parity). Closes #231 Closes #232 Closes #233 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6012c89 commit c465699

6 files changed

Lines changed: 35 additions & 5 deletions

File tree

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ on:
44
branches: [main]
55
pull_request:
66
branches: [main]
7+
schedule:
8+
- cron: "31 1,12 * * *"
79
workflow_dispatch:
810
jobs:
911
lint:
12+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
1013
runs-on: ubuntu-latest
1114
steps:
1215
- uses: actions/checkout@v7

.github/workflows/markdownlint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ on:
44
branches: [main]
55
pull_request:
66
branches: [main]
7+
schedule:
8+
- cron: "31 1,12 * * *"
79
workflow_dispatch:
810
jobs:
911
markdownlint:
12+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
1013
runs-on: ubuntu-latest
1114
steps:
1215
- uses: actions/checkout@v7

.github/workflows/scaffold-cross-platform.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8+
schedule:
9+
# Monday 06:00 UTC (CNA parity)
10+
- cron: "0 6 * * 1"
811
workflow_dispatch:
912

1013
permissions:
@@ -19,10 +22,12 @@ env:
1922
# After create-awesome-python-app>=0.2.0 ships resolve_catalog_spec, slugs also work.
2023
CPA_TEMPLATE_FASTAPI: https://github.com/Create-Python-App/cpa-templates?subdir=templates/fastapi-starter
2124
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
2226

2327
jobs:
2428
scaffold:
2529
name: ${{ matrix.os }} / fastapi-starter
30+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
2631
runs-on: ${{ matrix.os }}
2732
strategy:
2833
fail-fast: false
@@ -72,31 +77,40 @@ jobs:
7277
PY
7378
7479
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]
7787
steps:
7888
- uses: astral-sh/setup-uv@v7
7989
- uses: actions/setup-python@v6
8090
with:
8191
python-version: "3.12"
8292

83-
- name: Scaffold with one extension from PyPI CLI
93+
- name: Scaffold with compatible addon combination
8494
env:
85-
TARGET: ${{ runner.temp }}/cpa-fastapi-docker
95+
TARGET: ${{ runner.temp }}/cpa-fastapi-addons
96+
shell: bash
8697
run: |
8798
set -euo pipefail
8899
uvx create-awesome-python-app@latest \
89100
--template "$CPA_TEMPLATE_FASTAPI" \
90101
--addons "$CPA_ADDON_DOCKER" \
102+
--addons "$CPA_ADDON_GITHUB" \
91103
--no-interactive \
92104
--no-install \
93105
--force \
94106
"$TARGET"
95107
96108
- name: Verify extension files
97109
env:
98-
TARGET: ${{ runner.temp }}/cpa-fastapi-docker
110+
TARGET: ${{ runner.temp }}/cpa-fastapi-addons
111+
shell: bash
99112
run: |
100113
set -euo pipefail
101114
test -f "$TARGET/Dockerfile"
102115
test -f "$TARGET/.dockerignore"
116+
test -d "$TARGET/.github"

.github/workflows/shellcheck.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ on:
44
branches: [main]
55
pull_request:
66
branches: [main]
7+
schedule:
8+
- cron: "31 1,12 * * *"
79
workflow_dispatch:
810
jobs:
911
shellcheck:
12+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
1013
runs-on: ubuntu-latest
1114
steps:
1215
- uses: actions/checkout@v7

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ on:
44
branches: [main]
55
pull_request:
66
branches: [main]
7+
schedule:
8+
# Twice daily (CNA parity) — catch upstream/catalog regressions.
9+
- cron: "31 1,12 * * *"
710
workflow_dispatch:
811
jobs:
912
test:
13+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
1014
runs-on: ubuntu-latest
1115
steps:
1216
- uses: actions/checkout@v7

.github/workflows/type-check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ on:
44
branches: [main]
55
pull_request:
66
branches: [main]
7+
schedule:
8+
- cron: "31 1,12 * * *"
79
workflow_dispatch:
810
jobs:
911
typecheck:
12+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
1013
runs-on: ubuntu-latest
1114
steps:
1215
- uses: actions/checkout@v7

0 commit comments

Comments
 (0)