Skip to content

Commit e9dc70d

Browse files
(CI) run on 22.04 (#291)
2 parents 18e821b + c82101e commit e9dc70d

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

.github/workflows/nodeCI.yml

+22-14
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@ name: Node CI
22

33
on: [push, pull_request, workflow_dispatch]
44

5-
env:
6-
FORCE_COLOR: 1
7-
85
jobs:
96
build:
107
strategy:
118
fail-fast: false
129
matrix:
13-
os: [ubuntu-latest]
14-
node: [16]
10+
os: [ubuntu-22.04]
1511
electron_version: [29, 30, 31, 32]
12+
node: [16]
1613
include:
1714
- os: windows-latest
18-
node: 16
1915
command_prefix: ''
2016
electron_version: 32
21-
- os: ubuntu-latest
17+
node: 16
18+
- os: ubuntu-22.04
2219
command_prefix: xvfb-run
20+
2321
runs-on: ${{ matrix.os }}
2422
steps:
2523
- uses: actions/checkout@v4
@@ -29,21 +27,21 @@ jobs:
2927
node-version: ${{ matrix.node }}
3028
- name: Get yarn cache dir
3129
if: ${{ runner.os != 'Windows' }}
32-
id: yarn-cache
30+
id: yarn-cache-dir
3331
shell: bash
3432
run: |
35-
echo "dir=~/$(realpath -s --relative-to="${HOME}" "$(yarn cache dir)")" >> "${GITHUB_OUTPUT}"
36-
- name: Yarn cache
33+
echo "dir=$(yarn cache dir | sed "s|${HOME}|~|")" >> "${GITHUB_OUTPUT}"
34+
- name: Yarn cache restore
3735
if: ${{ runner.os != 'Windows' }}
38-
uses: actions/cache@v4
36+
id: yarn-cache-restore
37+
uses: actions/cache/restore@v4
3938
with:
40-
path: ${{ steps.yarn-cache.outputs.dir }}
39+
path: ${{ steps.yarn-cache-dir.outputs.dir }}
4140
key: ${{ matrix.os }}-yarn-node-${{ matrix.node }}-electron-${{ matrix.electron_version }}-${{ hashFiles('yarn.lock') }}
4241
restore-keys: |
4342
${{ matrix.os }}-yarn-node-${{ matrix.node }}-electron-${{ matrix.electron_version }}-
4443
${{ matrix.os }}-yarn-node-${{ matrix.node }}-
4544
${{ matrix.os }}-yarn-node-
46-
save-always: true
4745
- name: Electron version
4846
id: electron-version
4947
shell: bash
@@ -58,17 +56,27 @@ jobs:
5856
command: yarn install
5957
- name: yarn lint
6058
run: yarn lint
59+
env:
60+
FORCE_COLOR: 1
6161
- name: yarn test
6262
uses: nick-fields/retry@v3
6363
env:
6464
ELECTRON_VERSION: ${{ matrix.electron_version }}
65+
FORCE_COLOR: 1
6566
with:
6667
timeout_minutes: 5
6768
max_attempts: 3
6869
command: ${{ matrix.command_prefix }} yarn run test:ci
6970
- name: Upload coverage to Codecov
70-
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 16 && matrix.electron_version == 32 }}
71+
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.node == 16 && matrix.electron_version == 32 }}
7172
uses: codecov/codecov-action@v5
7273
with:
7374
token: ${{ secrets.CODECOV_TOKEN }}
7475
files: ./coverage/clover.xml
76+
- name: Yarn cache save always
77+
id: yarn-cache-save
78+
if: ${{ always() && runner.os != 'Windows' && steps.yarn-cache-restore.outputs.cache-hit != 'true' }}
79+
uses: actions/cache/save@v4
80+
with:
81+
path: ${{ steps.yarn-cache-dir.outputs.dir }}
82+
key: ${{ steps.yarn-cache-restore.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)