4040 # steps:
4141 # - name: Debugging context variables
4242 # run: echo "$GITHUB_CONTEXT"
43-
44- test :
45- name : Run test suite (Web Test Runner)
43+ lint :
44+ name : Lint files
4645 runs-on : ubuntu-latest
4746 steps :
4847 - name : Checkout repository
5251 - name : Configure node version
5352 uses : actions/setup-node@v3
5453 with :
55- node-version : ' 18 '
54+ node-version : ' 20 '
5655 cache : npm
5756
5857 - name : Install dependencies
@@ -62,13 +61,32 @@ jobs:
6261 id : lint
6362 run : npm run lint
6463
64+
65+ test :
66+ name : Run test suite (Web Test Runner)
67+ runs-on : ubuntu-latest
68+ steps :
69+ - name : Checkout repository
70+ uses : actions/checkout@v3
71+
72+ # Configures the node version used on GitHub-hosted runners
73+ - name : Configure node version
74+ uses : actions/setup-node@v3
75+ with :
76+ node-version : ' 20'
77+ cache : npm
78+
79+ - name : Install dependencies
80+ run : npm ci --prefer-offline
81+
82+ - name : install playwright
83+ run : npx playwright install
84+
6585 - name : Run tests
6686 run : npm test
67- if : ${{ always() }}
6887
6988 - name : JUnit Report Action
7089 uses : mikepenz/action-junit-report@v2.8.2
71- if : ${{ always() }}
7290 with :
7391 report_paths : test-results/test-results.xml
7492 fail_on_failure : true # fail the actions run if the tests failed
7997 strategy :
8098 matrix :
8199 node :
82- - ' 18'
83- - ' 19'
84- # https://github.com/TypeStrong/ts-node/issues/1997
85- # - '20'
100+ - ' 20'
101+ - ' 21'
86102 if : |
87103 github.event_name == 'workflow_dispatch'
88104 || github.event_name == 'push'
@@ -126,8 +142,9 @@ jobs:
126142 validate :
127143 name : Validate successful build on main
128144 needs :
129- - build
145+ - lint
130146 - test
147+ - build
131148 if : ${{ always() }}
132149 runs-on : ubuntu-latest
133150 steps :
0 commit comments