Skip to content

Commit 31932e6

Browse files
committed
CI: update to ubuntu 23.10 (simpler npm install)
Inspired by: conventional-changelog/commitlint@5847d14
1 parent 367b07d commit 31932e6

File tree

1 file changed

+11
-27
lines changed

1 file changed

+11
-27
lines changed

.github/workflows/CI.yml

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ 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:
1920
- uses: actions/checkout@v4
2021
- name: Install required dependencies
@@ -41,9 +42,10 @@ jobs:
4142
file-conventions-tests:
4243
name: Run FileConventions-lib unit tests
4344
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
4446
runs-on: ubuntu-22.04
4547
container:
46-
image: "ubuntu:22.04"
48+
image: "ubuntu:23.10"
4749
steps:
4850
- uses: actions/checkout@v4
4951
- name: Install required dependencies
@@ -66,9 +68,11 @@ jobs:
6668

6769
build-ts:
6870
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
6973
runs-on: ubuntu-22.04
7074
container:
71-
image: "ubuntu:22.04"
75+
image: "ubuntu:23.10"
7276
steps:
7377
- uses: actions/checkout@v4
7478
- name: Install required dependencies
@@ -78,10 +82,6 @@ jobs:
7882
sudo apt install --yes --no-install-recommends git ca-certificates
7983
8084
sudo apt install --yes --no-install-recommends npm curl
81-
# need to update nodejs because with ubuntu's default nodejs version we would get this error:
82-
# 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"
83-
sudo npm install --global n
84-
sudo n lts
8585
- name: Print versions
8686
run: |
8787
git --version
@@ -107,9 +107,10 @@ jobs:
107107
commitlint-plugins-tests:
108108
name: Run commitlint-related tests
109109
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
110111
runs-on: ubuntu-22.04
111112
container:
112-
image: "ubuntu:22.04"
113+
image: "ubuntu:23.10"
113114
steps:
114115
- uses: actions/checkout@v4
115116
- name: Install required dependencies
@@ -119,10 +120,6 @@ jobs:
119120
sudo apt install --yes --no-install-recommends git ca-certificates
120121
121122
sudo apt install --yes --no-install-recommends npm curl
122-
# need to update nodejs because with ubuntu's default nodejs version we would get this error:
123-
# 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"
124-
sudo npm install --global n
125-
sudo n lts
126123
- name: Install commitlint
127124
run: |
128125
npm install conventional-changelog-conventionalcommits
@@ -149,9 +146,10 @@ jobs:
149146
needs:
150147
- file-conventions-tests
151148
- 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
152150
runs-on: ubuntu-22.04
153151
container:
154-
image: "ubuntu:22.04"
152+
image: "ubuntu:23.10"
155153
env:
156154
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157155
steps:
@@ -164,20 +162,6 @@ jobs:
164162
sudo apt install --yes --no-install-recommends git
165163
# workaround for https://github.com/actions/runner/issues/2033
166164
git config --global --add safe.directory '*'
167-
168-
# need to update nodejs because with ubuntu's default nodejs version we would get this error:
169-
# ```
170-
# + npx commitlint --from HEAD~1 --to HEAD --verbose
171-
# /__w/conventions/conventions/node_modules/typescript/lib/typescript.js:139
172-
# for (let i = startIndex ?? 0; i < array.length; i++) {
173-
# ^
174-
#
175-
# SyntaxError: Unexpected token '?'
176-
# at wrapSafe (internal/modules/cjs/loader.js:915:16)
177-
# ...
178-
# ```
179-
sudo npm install --global n
180-
sudo n lts
181165
- uses: actions/checkout@v4
182166
with:
183167
submodules: recursive

0 commit comments

Comments
 (0)