Skip to content

Commit aeaf6f9

Browse files
authored
Merge PR #164 from nblockchain/wip/upgradeCI
* CI: upgrade checkout action. * CI: remove old git workaround. * CI: update to ubuntu 23.10 (simpler npm install).
2 parents 102d14a + 31932e6 commit aeaf6f9

File tree

1 file changed

+20
-38
lines changed

1 file changed

+20
-38
lines changed

.github/workflows/CI.yml

Lines changed: 20 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@ on:
1212
jobs:
1313
build-fs:
1414
name: Build F#
15+
# TODO: upgrade to 24.04->24.04 (because LTS) as soon as it's available, instead of 22.04->23.10
1516
runs-on: ubuntu-22.04
1617
container:
17-
image: "ubuntu:22.04"
18+
image: "ubuntu:23.10"
1819
steps:
19-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2021
- name: Install required dependencies
2122
run: |
2223
apt update
2324
apt install --yes sudo
2425
sudo apt install --yes --no-install-recommends git
25-
# workaround for https://github.com/actions/runner/issues/2033
26-
- name: ownership workaround
27-
run: git config --global --add safe.directory '*'
2826
2927
- name: Setup .NET
3028
run: |
@@ -44,11 +42,12 @@ jobs:
4442
file-conventions-tests:
4543
name: Run FileConventions-lib unit tests
4644
needs: build-fs
45+
# TODO: upgrade to 24.04->24.04 (because LTS) as soon as it's available, instead of 22.04->23.10
4746
runs-on: ubuntu-22.04
4847
container:
49-
image: "ubuntu:22.04"
48+
image: "ubuntu:23.10"
5049
steps:
51-
- uses: actions/checkout@v2
50+
- uses: actions/checkout@v4
5251
- name: Install required dependencies
5352
run: |
5453
apt update
@@ -69,22 +68,20 @@ jobs:
6968

7069
build-ts:
7170
name: Build TypeScript
71+
72+
# TODO: upgrade to 24.04->24.04 (because LTS) as soon as it's available, instead of 22.04->23.10
7273
runs-on: ubuntu-22.04
7374
container:
74-
image: "ubuntu:22.04"
75+
image: "ubuntu:23.10"
7576
steps:
76-
- uses: actions/checkout@v2
77+
- uses: actions/checkout@v4
7778
- name: Install required dependencies
7879
run: |
7980
apt update
8081
apt install --yes sudo
8182
sudo apt install --yes --no-install-recommends git ca-certificates
8283
8384
sudo apt install --yes --no-install-recommends npm curl
84-
# need to update nodejs because with ubuntu's default nodejs version we would get this error:
85-
# error @jest/[email protected]: The engine "node" is incompatible with this module. Expected version "^14.15.0 || ^16.10.0 || >=18.0.0". Got "12.22.9"
86-
sudo npm install --global n
87-
sudo n lts
8885
- name: Print versions
8986
run: |
9087
git --version
@@ -110,22 +107,19 @@ jobs:
110107
commitlint-plugins-tests:
111108
name: Run commitlint-related tests
112109
needs: build-ts
110+
# TODO: upgrade to 24.04->24.04 (because LTS) as soon as it's available, instead of 22.04->23.10
113111
runs-on: ubuntu-22.04
114112
container:
115-
image: "ubuntu:22.04"
113+
image: "ubuntu:23.10"
116114
steps:
117-
- uses: actions/checkout@v2
115+
- uses: actions/checkout@v4
118116
- name: Install required dependencies
119117
run: |
120118
apt update
121119
apt install --yes sudo
122120
sudo apt install --yes --no-install-recommends git ca-certificates
123121
124122
sudo apt install --yes --no-install-recommends npm curl
125-
# need to update nodejs because with ubuntu's default nodejs version we would get this error:
126-
# error @jest/[email protected]: The engine "node" is incompatible with this module. Expected version "^14.15.0 || ^16.10.0 || >=18.0.0". Got "12.22.9"
127-
sudo npm install --global n
128-
sudo n lts
129123
- name: Install commitlint
130124
run: |
131125
npm install conventional-changelog-conventionalcommits
@@ -152,39 +146,27 @@ jobs:
152146
needs:
153147
- file-conventions-tests
154148
- commitlint-plugins-tests
149+
# TODO: upgrade to 24.04->24.04 (because LTS) as soon as it's available, instead of 22.04->23.10
155150
runs-on: ubuntu-22.04
156151
container:
157-
image: "ubuntu:22.04"
152+
image: "ubuntu:23.10"
158153
env:
159154
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
160155
steps:
161156
- name: Install required dependencies
162157
run: |
163158
apt update && apt install --yes sudo
164-
sudo apt install --yes --no-install-recommends git
165159
166160
sudo apt install --yes --no-install-recommends npm curl
167-
# need to update nodejs because with ubuntu's default nodejs version we would get this error:
168-
# ```
169-
# + npx commitlint --from HEAD~1 --to HEAD --verbose
170-
# /__w/conventions/conventions/node_modules/typescript/lib/typescript.js:139
171-
# for (let i = startIndex ?? 0; i < array.length; i++) {
172-
# ^
173-
#
174-
# SyntaxError: Unexpected token '?'
175-
# at wrapSafe (internal/modules/cjs/loader.js:915:16)
176-
# ...
177-
# ```
178-
sudo npm install --global n
179-
sudo n lts
180-
- uses: actions/checkout@v2
161+
162+
sudo apt install --yes --no-install-recommends git
163+
# workaround for https://github.com/actions/runner/issues/2033
164+
git config --global --add safe.directory '*'
165+
- uses: actions/checkout@v4
181166
with:
182167
submodules: recursive
183168
# needed because of commit-lint, see https://github.com/conventional-changelog/commitlint/issues/3376
184169
fetch-depth: 0
185-
# workaround for https://github.com/actions/runner/issues/2033
186-
- name: ownership workaround
187-
run: git config --global --add safe.directory '*'
188170
- name: Print versions
189171
run: |
190172
git --version

0 commit comments

Comments
 (0)