Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions .github/workflows/job-reruns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ on:
paths:
- '.github/workflows/job-reruns.yml'
- '.github/scripts/job_reruns.py'
- '.github/scripts/test_job_reruns.py'
pull_request:
paths:
- '.github/workflows/job-reruns.yml'
- '.github/scripts/job_reruns.py'
- '.github/scripts/test_job_reruns.py'
issues:
types: [edited]
workflow_dispatch:
Expand All @@ -23,19 +29,41 @@ permissions:
issues: write

# Several scheduled workflows can finish together. Keep their issue updates in order so a
# slower API response cannot overwrite a newer view of the runs.
# slower API response cannot overwrite a newer view of the runs. PR validation has its own
# per-branch group so it neither blocks nor gets blocked by those live updates.
concurrency:
group: job-reruns-dashboard
cancel-in-progress: false
group: >-
${{ github.event_name == 'pull_request'
&& format('job-reruns-validation-{0}', github.ref)
|| 'job-reruns-dashboard' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
validate:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v7.0.1

- name: Test dashboard logic
run: python3 .github/scripts/test_job_reruns.py

update-issue:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v7.0.1

# Cheap enough to gate every live invocation, including issue edits and workflow-run
# completions. A broken dashboard helper should fail before it mutates the tracking issue
# or dispatches another workflow.
- name: Test dashboard logic
run: python3 .github/scripts/test_job_reruns.py

- name: Dispatch selected jobs and update issue
env:
GH_TOKEN: ${{ github.token }}
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,26 @@ on:
- main
paths:
- 'network/**'
- 'build.gradle.kts'
- 'settings.gradle.kts'
- 'gradle/**'
- 'gradlew'
- 'gradlew.bat'
- 'conscrypt/fetch-conscrypt.sh'
- 'conscrypt/release-tag.sh'
- 'conscrypt/pinned.properties'
- '.github/workflows/network.yml'
pull_request:
paths:
- 'network/**'
- 'build.gradle.kts'
- 'settings.gradle.kts'
- 'gradle/**'
- 'gradlew'
- 'gradlew.bat'
- 'conscrypt/fetch-conscrypt.sh'
- 'conscrypt/release-tag.sh'
- 'conscrypt/pinned.properties'
- '.github/workflows/network.yml'
schedule:
# Daily, so a change at one of the servers these tests call — or in a published
Expand Down
42 changes: 34 additions & 8 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
paths:
- 'site/**'
- '.github/workflows/pages.yml'
pull_request:
paths:
- 'site/**'
- '.github/workflows/pages.yml'
workflow_dispatch:

permissions:
Expand All @@ -26,10 +30,14 @@ permissions:
issues: read

# Never two deploys at once, and never cancel one half-done: the deployed site carries the
# history, so a cancelled deploy would lose whatever it was about to publish.
# history, so a cancelled deploy would lose whatever it was about to publish. PR validation
# has its own per-branch group so it cannot hold up a production deployment.
concurrency:
group: pages
cancel-in-progress: false
group: >-
${{ github.event_name == 'pull_request'
&& format('pages-validation-{0}', github.ref)
|| 'pages' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
# Every workflow whose results the page reports. Each one's most recent completed run on
Expand All @@ -38,15 +46,33 @@ env:
TEST_WORKFLOWS: containers.yml network.yml android-ech.yml

jobs:
validate:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v7.0.1

- name: Validate result collector
run: python3 -m compileall -q site/tools

- name: Validate JavaScript
run: |
for script in site/assets/*.js; do
node --check "$script"
done

build-and-deploy:
# Only runs that report on main get published. A pull request's test run is about the
# pull request; it must not overwrite the status of the repository.
if: >-
github.event_name != 'workflow_run'
|| (github.event.workflow_run.head_branch == 'main'
&& github.event.workflow_run.event != 'pull_request'
&& github.event.workflow_run.conclusion != 'cancelled'
&& github.event.workflow_run.conclusion != 'skipped')
github.event_name != 'pull_request'
&& (github.event_name != 'workflow_run'
|| (github.event.workflow_run.head_branch == 'main'
&& github.event.workflow_run.event != 'pull_request'
&& github.event.workflow_run.conclusion != 'cancelled'
&& github.event.workflow_run.conclusion != 'skipped'))

runs-on: ubuntu-latest

Expand Down
Loading