Skip to content

Commit c49f58d

Browse files
committed
chore: update GitHub Actions workflow for testing and deployment
- Renamed test job from 'test_linux' to 'tests' for clarity. - Updated OS matrix to include Ubuntu 22.04 and Windows 2022. - Changed Node.js version from 16 to 18 in both test and publish jobs. - Upgraded actions/cache from v1 to v3 for improved caching. - Modified publish job to run on 'mulesoft-ubuntu' and adjusted conditions for execution.
1 parent 826976c commit c49f58d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

.github/workflows/deployment.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,20 @@ on:
1212
- master
1313
- main
1414
jobs:
15-
test_linux:
15+
tests:
1616
name: ${{ matrix.os }}
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
os: [ubuntu-20.04]
21-
# os: [ubuntu-18.04, ubuntu-20.04]
20+
os: [ubuntu-22.04, windows-2022]
2221
runs-on: ${{ matrix.os }}
2322
steps:
2423
- uses: actions/checkout@v2
2524
- uses: actions/setup-node@v1
2625
with:
27-
node-version: 16
26+
node-version: 18
2827
- uses: microsoft/playwright-github-action@v1
29-
- uses: actions/cache@v1
28+
- uses: actions/cache@v3
3029
with:
3130
path: ~/.npm
3231
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -38,27 +37,26 @@ jobs:
3837
run: npm test
3938
tag:
4039
name: "Publishing release"
41-
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
42-
needs:
43-
- test_linux
44-
# - test_win
45-
runs-on: ubuntu-latest
40+
if: github.event_name != 'pull_request'
41+
needs:
42+
- tests
43+
runs-on: mulesoft-ubuntu
4644
steps:
4745
- name: Checkout code
4846
uses: actions/checkout@v2
4947
with:
5048
fetch-depth: 0
5149
- uses: actions/setup-node@v2
5250
with:
53-
node-version: '16.x'
51+
node-version: '18.x'
5452
registry-url: 'https://registry.npmjs.org'
55-
- uses: actions/cache@v1
53+
- uses: actions/cache@v3
5654
with:
5755
path: ~/.npm
5856
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
5957
restore-keys: |
6058
${{ runner.os }}-node-
61-
- run: npm install
59+
- run: npm ci
6260
- name: Read version from package.json
6361
uses: culshaw/read-package-node-version-actions@v1
6462
id: package-node-version

0 commit comments

Comments
 (0)