2020-09-10 19:08:29 +00:00
|
|
|
name: test
|
|
|
|
|
2020-10-01 01:18:23 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
2020-09-10 19:08:29 +00:00
|
|
|
|
2023-09-25 18:29:05 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-09-10 19:08:29 +00:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-09-25 23:08:18 +00:00
|
|
|
node-version: [12, 14, 20]
|
2020-09-10 19:08:29 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-09-25 18:31:57 +00:00
|
|
|
# Temporarily skip older node-version checks until they are removed from required checks
|
2023-09-25 21:14:27 +00:00
|
|
|
if: ${{ matrix.node-version >= 16 }}
|
2023-10-18 11:47:20 +00:00
|
|
|
uses: actions/checkout@v4.1.1
|
2020-09-10 19:08:29 +00:00
|
|
|
|
2020-09-10 20:26:14 +00:00
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
2023-09-25 18:31:57 +00:00
|
|
|
# Temporarily skip older node-version checks until they are removed from required checks
|
2023-09-25 21:14:27 +00:00
|
|
|
if: ${{ matrix.node-version >= 16 }}
|
2023-10-26 05:53:07 +00:00
|
|
|
uses: actions/setup-node@v4.0.0
|
2020-09-10 19:08:29 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2023-09-25 18:26:36 +00:00
|
|
|
cache: "npm"
|
2020-09-10 21:52:56 +00:00
|
|
|
|
2020-09-10 20:26:14 +00:00
|
|
|
- name: Install dependencies
|
2023-09-25 18:31:57 +00:00
|
|
|
# Temporarily skip older node-version checks until they are removed from required checks
|
2023-09-25 21:14:27 +00:00
|
|
|
if: ${{ matrix.node-version >= 16 }}
|
2020-09-10 20:26:14 +00:00
|
|
|
run: npm ci
|
2020-09-10 19:08:29 +00:00
|
|
|
env:
|
|
|
|
SKIP_BUILD: true
|
|
|
|
|
|
|
|
- name: Lint
|
2023-09-25 18:31:57 +00:00
|
|
|
# Temporarily skip older node-version checks until they are removed from required checks
|
2023-09-25 21:14:27 +00:00
|
|
|
if: ${{ matrix.node-version >= 16 }}
|
2020-09-10 19:08:29 +00:00
|
|
|
run: npm run lint -- --no-fix
|
|
|
|
|
|
|
|
- name: Build
|
2023-09-25 18:31:57 +00:00
|
|
|
# Temporarily skip older node-version checks until they are removed from required checks
|
2023-09-25 21:14:27 +00:00
|
|
|
if: ${{ matrix.node-version >= 16 }}
|
2020-09-28 22:30:03 +00:00
|
|
|
run: npm run build
|