77 - master
88 - main
99 - develop
10- - stage
11- - support/*
1210 pull_request :
1311 branches :
1412 - master
1513 - main
16- - stage
17- - support/*
1814jobs :
19- tests :
15+ test_linux :
2016 name : ${{ matrix.os }}
2117 strategy :
2218 fail-fast : false
2319 matrix :
24- os : [ubuntu-20 .04, windows-2019 ]
20+ os : [ubuntu-22 .04]
2521 runs-on : ${{ matrix.os }}
2622 steps :
2723 - uses : actions/checkout@v2
2824 - uses : actions/setup-node@v1
2925 with :
3026 node-version : 18
31- - uses : microsoft/playwright-github-action@v1
3227 - uses : actions/cache@v3
3328 with :
3429 path : ~/.npm
3530 key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
3631 restore-keys : |
3732 ${{ runner.os }}-node-
3833 - name : Install dependencies
39- run : npm ci
34+ run : npm install
35+ - name : Install Playwright Browsers
36+ run : npx playwright install --with-deps
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 : 18
47+ - uses : actions/cache@v3
48+ with :
49+ path : ~/.npm
50+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
51+ restore-keys : |
52+ ${{ runner.os }}-node-
53+ - name : Install dependencies
54+ run : npm install
55+ - name : Install Playwright Browsers
56+ run : npx playwright install --with-deps
4057 - name : Run tests
4158 run : npm test
4259 tag :
4360 name : " Publishing release"
44- if : github.event_name != 'pull_request '
61+ if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master '
4562 needs :
46- - tests
47- runs-on : mulesoft-ubuntu
63+ - test_linux
64+ - test_win
65+ runs-on : ubuntu-latest
4866 steps :
4967 - name : Checkout code
5068 uses : actions/checkout@v2
6078 key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
6179 restore-keys : |
6280 ${{ runner.os }}-node-
63- - run : npm ci
81+ - run : npm install
6482 - name : Read version from package.json
6583 uses : culshaw/read-package-node-version-actions@v1
6684 id : package-node-version
8199 prerelease : false
82100 - run : npm publish --access public
83101 env :
84- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
102+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments