-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (135 loc) · 4.58 KB
/
Copy pathcontent-update.yml
File metadata and controls
139 lines (135 loc) · 4.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Content update
on:
pull_request:
branches:
- main
paths:
- .github/actions/content-update/action.yml
- .github/workflows/content-update.yml
- Makefile
- ci/content_update.py
- ci/tests/test_content_update.py
- content/**
- content_sync/**
- courses/**
- api/views/course_repository_webhooks.py
- api/tests/test_course_repository_webhooks.py
- scripts/build_public_projection.py
- scripts/prepare_course_platform_source.py
- scripts/sync_course_platform.py
- scripts/verify_course_platform_adoption.py
- scripts/tests/test_sync_course_platform.py
- templates/**
- course_platform_templates/**
- _docs/adoption/course-platform/**
- _docs/compatibility/**
- _docs/ci/content-update.md
- _docs/runbooks/content-update.md
push:
branches:
- main
paths:
- .github/actions/content-update/action.yml
- .github/workflows/content-update.yml
- Makefile
- ci/content_update.py
- ci/tests/test_content_update.py
- content/**
- content_sync/**
- courses/**
- api/views/course_repository_webhooks.py
- api/tests/test_course_repository_webhooks.py
- scripts/build_public_projection.py
- scripts/prepare_course_platform_source.py
- scripts/sync_course_platform.py
- scripts/verify_course_platform_adoption.py
- scripts/tests/test_sync_course_platform.py
- templates/**
- course_platform_templates/**
- _docs/adoption/course-platform/**
- _docs/compatibility/**
- _docs/ci/content-update.md
- _docs/runbooks/content-update.md
workflow_dispatch:
permissions:
contents: read
concurrency:
group: website-content-update-${{ github.ref }}
cancel-in-progress: false
jobs:
validate:
name: Validate ${{ matrix.family }} content
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
strategy:
fail-fast: false
matrix:
family:
- courses
- podwiki
- faq
- docs
steps:
- name: Check out the reviewed website tree
uses: actions/checkout@v4
with:
clean: true
fetch-depth: 1
persist-credentials: false
- name: Install the locked Python environment
uses: astral-sh/setup-uv@v6
with:
enable-cache: false
version: "0.10.11"
- name: Sync locked dependencies
run: uv sync --locked
- name: Run the common content-update contract
uses: ./.github/actions/content-update
with:
family: ${{ matrix.family }}
output-directory: .tmp/content-update/${{ matrix.family }}
- name: Run course source-specific validation
if: matrix.family == 'courses'
run: |
set -euo pipefail
uv run --frozen pytest \
content_sync/tests/test_course_repository.py \
content_sync/tests/test_course_repository_registration.py \
content_sync/tests/test_course_repository_sync.py \
content_sync/tests/test_webhook_delivery.py \
api/tests/test_course_repository_webhooks.py \
courses/tests/test_curriculum_import_service.py \
courses/tests/test_curriculum_source_provenance.py -q
- name: Run Podwiki source-specific validation
if: matrix.family == 'podwiki'
env:
DJANGO_SETTINGS_MODULE: website.settings.test
run: |
set -euo pipefail
uv run --frozen python manage.py test \
content.tests.test_wiki_design \
content.tests.test_podcast_episode_graph --noinput
- name: Run FAQ source-specific validation
if: matrix.family == 'faq'
env:
DJANGO_SETTINGS_MODULE: website.settings.test
run: |
set -euo pipefail
uv run --frozen python manage.py test content.tests.test_faq --noinput
- name: Run Docs source-specific validation
if: matrix.family == 'docs'
env:
DJANGO_SETTINGS_MODULE: website.settings.test
run: |
set -euo pipefail
uv run --frozen python manage.py test content.tests.test_docs_projection --noinput
- name: Upload the redacted content-update report
if: always()
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: content-update-${{ matrix.family }}-${{ github.run_id }}-attempt-${{ github.run_attempt }}
path: .tmp/content-update/${{ matrix.family }}/report.json
retention-days: 30