Repository navigation
53 lines (50 loc) · 1.34 KB
/
Copy pathtest.yml
File metadata and controls
53 lines (50 loc) · 1.34 KB
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
45
46
47
48
49
50
51
52
53
name: Test
on:
workflow_dispatch:
pull_request:
push:
branches:
- "master"
permissions:
contents: read
jobs:
check:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Lint and format
run: npm run lint && npm run format:check
- name: Build and sizes
run: npm run build && npm run size && npm run size:data
- name: Unit tests
run: npm run test:unit
- name: Svelte checks and tooling tests
run: npm run check:a11y && npm run test:tooling
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: ${{ matrix.name }}
run: ${{ matrix.run }}
# A skipped required check counts as passing.
test:
name: Test
needs: check
if: always()
runs-on: ubuntu-latest
steps:
- name: Require every check to pass
run: test "$RESULT" = success
env:
RESULT: ${{ needs.check.result }}