forked from pa11y/pa11y
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.18 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This workflow will do a clean install of node dependencies, build the source code and run tests.
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build and lint
on:
push:
branches: # Run actions when code is committed to these branches
- master
pull_request:
branches: # Run actions when a PR is pushed based on one of these branches
- master
- 1.x
- 2.x
- 3.x
- 4.x
- 5.x
- 5.2.x
jobs:
checkout_and_test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- node-version: 12.x
lint: true # Linter is run only once to shorten the total build time
- node-version: 14.x
- node-version: 16.x
steps:
- name: Checkout code from ${{ github.repository }}
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run linter
if: ${{ matrix.lint }}
run: npm run lint
- name: Run tests
run: npm test