Skip to content

Commit 6736544

Browse files
committed
Update GitHub Actions workflow to use Node.js 18 and Ubuntu 22.04, remove Windows testing, and enhance Playwright setup.
1 parent c1dc80a commit 6736544

File tree

1 file changed

+34
-42
lines changed

1 file changed

+34
-42
lines changed

.github/workflows/deployment.yml

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -11,72 +11,64 @@ on:
1111
branches:
1212
- master
1313
- main
14+
types: [opened, synchronize, reopened]
1415
jobs:
1516
test_linux:
1617
name: ${{ matrix.os }}
1718
strategy:
1819
fail-fast: false
1920
matrix:
20-
os: [ubuntu-20.04]
21-
# os: [ubuntu-18.04, ubuntu-20.04]
21+
os: [ubuntu-22.04]
22+
# os: [ubuntu-20.04, ubuntu-22.04]
2223
runs-on: ${{ matrix.os }}
2324
steps:
24-
- uses: actions/checkout@v2
25-
- uses: actions/setup-node@v1
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-node@v4
2627
with:
27-
node-version: 16
28-
- uses: microsoft/playwright-github-action@v1
29-
- uses: actions/cache@v1
30-
with:
31-
path: ~/.npm
32-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
33-
restore-keys: |
34-
${{ runner.os }}-node-
35-
- name: Install dependencies
36-
run: npm ci
37-
- name: Run tests
38-
run: npm test
39-
test_win:
40-
name: "Windows"
41-
runs-on: windows-latest
42-
steps:
43-
- uses: actions/checkout@v2
44-
- uses: actions/setup-node@v1
45-
with:
46-
node-version: 16
47-
- uses: microsoft/playwright-github-action@v1
48-
- uses: actions/cache@v1
49-
with:
50-
path: ~/.npm
51-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
52-
restore-keys: |
53-
${{ runner.os }}-node-
28+
node-version: 18
29+
cache: 'npm'
5430
- name: Install dependencies
5531
run: npm ci
32+
- name: Install Playwright Browsers
33+
run: npx playwright install --with-deps
5634
- name: Run tests
5735
run: npm test
36+
# test_win:
37+
# name: "Windows"
38+
# runs-on: windows-latest
39+
# steps:
40+
# - uses: actions/checkout@v2
41+
# - uses: actions/setup-node@v1
42+
# with:
43+
# node-version: 14
44+
# - uses: microsoft/playwright-github-action@v1
45+
# - uses: actions/cache@v1
46+
# with:
47+
# path: ~/.npm
48+
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
49+
# restore-keys: |
50+
# ${{ runner.os }}-node-
51+
# - name: Install dependencies
52+
# run: npm ci
53+
# - name: Run tests
54+
# run: npm test
5855
tag:
5956
name: "Publishing release"
6057
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
6158
needs:
6259
- test_linux
63-
- test_win
64-
runs-on: ubuntu-latest
60+
# - test_win
61+
runs-on: ubuntu-22.04
6562
steps:
6663
- name: Checkout code
67-
uses: actions/checkout@v2
64+
uses: actions/checkout@v4
6865
with:
6966
fetch-depth: 0
70-
- uses: actions/setup-node@v2
67+
- uses: actions/setup-node@v4
7168
with:
72-
node-version: '16.x'
69+
node-version: '18.x'
7370
registry-url: 'https://registry.npmjs.org'
74-
- uses: actions/cache@v1
75-
with:
76-
path: ~/.npm
77-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
78-
restore-keys: |
79-
${{ runner.os }}-node-
71+
cache: 'npm'
8072
- run: npm install
8173
- name: Read version from package.json
8274
uses: culshaw/read-package-node-version-actions@v1

0 commit comments

Comments
 (0)