43 lines (35 loc) · 1.04 KB
/
pull-request.yaml
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
name: Validate Pull Request
# This workflow verifies that the site will build for pull requests.
on: [pull_request]
jobs:
validate-pull-request:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version:
- 14.x
- 16.x
- 18.x
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
# Fixup Git URLs, see:
# https://stackoverflow.com/questions/70663523/the-unauthenticated-git-protocol-on-port-9418-is-no-longer-supported
- name: Fix up git URLs
run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig
# Lint and test.
- name: ci
run: npm ci
- name: lint
run: npm run lint
- name: test
run: npm test
# Upload coverage to codecov.
- uses: codecov/codecov-action@v3
with:
directory: ./coverage