Repository navigation
69 lines (55 loc) · 1.66 KB
/
Copy pathtest.yml
File metadata and controls
69 lines (55 loc) · 1.66 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: test
# On every pull request, but only on push to master
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
jobs:
test-node-matrix:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
maplibre: ['^4.0.0', '^5.0.0', '^6.0.0']
permissions:
checks: write
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: '.nvmrc'
- name: Enable Corepack
run: corepack enable yarn
- name: Install dependencies
run: yarn install --immutable
- name: Install MapLibre GL JS ${{ matrix.maplibre }}
run: yarn workspace @vis.gl/react-maplibre add --dev "maplibre-gl@${{ matrix.maplibre }}"
- name: Install Playwright browser
run: yarn playwright:install
- name: Build packages
run: yarn build
- name: Run tests
env:
VITE_MAPBOX_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN_CI }}
run: |
yarn lint
yarn test-node
yarn cover
- name: Coveralls
if: matrix.maplibre == '^5.0.0'
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-error: false
test-node:
runs-on: ubuntu-22.04
needs: test-node-matrix
if: ${{ always() }}
steps:
- name: Check test matrix
run: test "${{ needs.test-node-matrix.result }}" = "success"