File tree Expand file tree Collapse file tree 5 files changed +77
-9
lines changed Expand file tree Collapse file tree 5 files changed +77
-9
lines changed Original file line number Diff line number Diff line change 1+ from pathlib import Path
2+
3+ content = Path (".github/workflows/main.yml" ).read_text ()
4+ content = (
5+ content .replace (
6+ "name: CI" ,
7+ "name: CI (release)" ,
8+ )
9+ .replace (
10+ " pull_request:\n paths-ignore: ['docs/**', '*.md']" ,
11+ "\n " ,
12+ )
13+ .replace (
14+ "branches: [master]" ,
15+ "branches: [v1]" ,
16+ )
17+ .replace (
18+ "cron: '0 6 * * 6'" ,
19+ "cron: '0 6 * * *'" ,
20+ )
21+ .replace (
22+ " - run: npm install --only=prod" ,
23+ "" ,
24+ )
25+ .replace (
26+ " - uses: ./" ,
27+ " - uses: crystal-lang/install-crystal@v1" ,
28+ )
29+ )
30+ Path (".github/workflows/release.yml" ).write_text (content )
Original file line number Diff line number Diff line change 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 edits
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
Original file line number Diff line number Diff line change 8585 shards build
8686 working-directory: test-project
8787 if: ${{ !contains('false', matrix.config.shards) }}
88-
89- test :
90- runs-on : ubuntu-latest
91- steps :
92- - uses : actions/checkout@v5
93- - run : npm install
94- - run : npm test
Original file line number Diff line number Diff line change @@ -2,10 +2,10 @@ name: CI (release)
22
33on :
44 push :
5- branches : [v1]
6-
5+ paths-ignore : ['docs/**', '*.md']
76
87
8+ branches : [v1]
99 schedule :
1010 - cron : ' 0 6 * * *'
1111
2828 - {shards: latest, crystal: latest}
2929 - {shards: nightly, crystal: nightly}
3030 - {crystal: 'branch:master'}
31+ exclude :
32+ - os : ubuntu-24.04-arm
33+ config : {shards: '0.14', crystal: '1.3'}
34+ include :
35+ - os : ubuntu-24.04-arm
36+ config : {shards: '0.19', crystal: '1.18'}
3137
3238 name : crystal ${{ matrix.config.crystal }} + shards ${{ matrix.config.shards }} (${{ matrix.os }})
3339 runs-on : ${{ matrix.os }}
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments