Skip to content

Commit dd609c9

Browse files
committed
Add a check that main.yml and release.yml are exactly in sync
1 parent 90e8d32 commit dd609c9

File tree

4 files changed

+42
-10
lines changed

4 files changed

+42
-10
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Checks that the files 'main.yml' and 'release.yml' are exactly in sync
2+
3+
name: Check workflow configs
4+
on:
5+
pull_request:
6+
jobs:
7+
check_configs:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Download source
11+
uses: actions/checkout@v5
12+
- name: Apply the existing patch
13+
run: |
14+
python3 .github/generate_release_yml.py
15+
- name: Check if any edits are necessary
16+
id: diff
17+
run: |
18+
git diff --color --exit-code
19+
- name: Apply automatic fixes using pre-commit-ci-lite
20+
if: failure() && steps.diff.outcome == 'failure'
21+
uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0

.github/workflows/main.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,3 @@ jobs:
7878
shards build
7979
working-directory: test-project
8080
if: ${{ !contains('false', matrix.config.shards) }}
81-
82-
test:
83-
runs-on: ubuntu-latest
84-
steps:
85-
- uses: actions/checkout@v5
86-
- run: npm install
87-
- run: npm test

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: CI (release)
22

33
on:
44
push:
5+
paths-ignore: ['docs/**', '*.md']
6+
pull_request:
7+
paths-ignore: ['docs/**', '*.md']
58
branches: [v1]
6-
7-
8-
99
schedule:
1010
- cron: '0 6 * * *'
1111

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
paths-ignore: ['docs/**', '*.md']
6+
pull_request:
7+
paths-ignore: ['docs/**', '*.md']
8+
branches: [master]
9+
schedule:
10+
- cron: '0 6 * * 6'
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- run: npm install
18+
- run: npm test

0 commit comments

Comments
 (0)