forked from maplibre/maplibre-style-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.74 KB
/
test-all.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Automated Testing
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
checks: write
pull-requests: write
contents: write
jobs:
code-hygiene:
name: Code Hygiene
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: npm ci
- run: npm run lint
if: success() || failure()
- run: npm run typecheck
if: success() || failure()
unit-and-integration-tests:
name: Unit and Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: npm ci
- run: npm run jest-ci -- --coverage --coverageDirectory=coverage-unit --coverageReporters json --selectProjects unit
- run: npm run jest-ci -- --coverage --coverageDirectory=coverage-integration --coverageReporters json --selectProjects integration
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: ${{ github.workspace }}/coverage-unit/coverage-final.json, ${{ github.workspace }}/coverage-integration/coverage-final.json
verbose: true
packaging-tests:
name: Packaging and Build tests
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: npm ci
- run: npm run generate-style-spec
- run: npm run generate-typings
- run: npm run build
- run: npm run jest-ci -- --selectProjects build
if: success() || failure()