@@ -3,65 +3,65 @@ name: Package Tests
33on : [push, pull_request]
44
55jobs :
6- npm :
7- name : " @wq/${{ matrix.package }}"
8- runs-on : ubuntu-20.04
9- env :
10- PACKAGE : ${{ matrix.package }}
11- strategy :
12- fail-fast : false
13- matrix :
14- python-version : ["3.10 "]
15- node-version : [18 ]
16- package :
17- - map
18- - map-gl
19- - map-gl-web
20- - map-gl-native
21- steps :
22- - uses : actions/checkout@v2
23- with :
24- fetch-depth : 0
25- - name : Set up Node ${{ matrix.node-version }}
26- uses : actions/setup-node@v2
27- with :
28- node-version : ${{ matrix.node-version }}
29- - name : Set up Python ${{ matrix.python-version }}
30- uses : actions/setup-python@v2
31- with :
32- python-version : ${{ matrix.python-version }}
33- - name : Install dependencies
34- run : |
35- echo "@wq:registry=https://npm.pkg.github.com/wq" > .npmrc
36- echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
37- npm ci && npm run build
38- - name : Install native dependencies
39- if : matrix.package == 'map-gl-native'
40- run : |
41- cd packages/$PACKAGE
42- echo "@wq:registry=https://npm.pkg.github.com/wq" > .npmrc
43- echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
44- npm ci
45- - name : Lint with ESLint
46- run : npm run lint
47- - name : Start test server
48- run : python -m tests.server &
49- - name : Test with Jest
50- run : |
51- cd packages/$PACKAGE
52- npm run test
53- - uses : smartsquaregmbh/delete-old-packages@v0.4.0
54- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
55- with :
56- keep : 5
57- names : ${{ matrix.package }}
58- - name : Publish to Github Packages
59- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
60- run : |
61- python -m pip install setuptools_scm
62- ./set_dev_version.sh
63- echo "registry=https://npm.pkg.github.com/wq" > .npmrc
64- echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
65- cp .npmrc packages/$PACKAGE/.npmrc # for native builds
66- cd packages/$PACKAGE
67- npm publish
6+ npm :
7+ name : " @wq/${{ matrix.package }}"
8+ runs-on : ubuntu-latest
9+ env :
10+ PACKAGE : ${{ matrix.package }}
11+ strategy :
12+ fail-fast : false
13+ matrix :
14+ python-version : ["3.14 "]
15+ node-version : [24 ]
16+ package :
17+ - map
18+ - map-gl
19+ - map-gl-web
20+ - map-gl-native
21+ steps :
22+ - uses : actions/checkout@v6
23+ with :
24+ fetch-depth : 0
25+ - name : Set up Node ${{ matrix.node-version }}
26+ uses : actions/setup-node@v6
27+ with :
28+ node-version : ${{ matrix.node-version }}
29+ - name : Set up Python ${{ matrix.python-version }}
30+ uses : actions/setup-python@v6
31+ with :
32+ python-version : ${{ matrix.python-version }}
33+ - name : Install dependencies
34+ run : |
35+ echo "@wq:registry=https://npm.pkg.github.com/wq" > .npmrc
36+ echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
37+ npm ci && npm run build
38+ - name : Install native dependencies
39+ if : matrix.package == 'map-gl-native'
40+ run : |
41+ cd packages/$PACKAGE
42+ echo "@wq:registry=https://npm.pkg.github.com/wq" > .npmrc
43+ echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
44+ npm ci
45+ - name : Lint with ESLint
46+ run : npm run lint
47+ - name : Start test server
48+ run : python -m tests.server &
49+ - name : Test with Jest
50+ run : |
51+ cd packages/$PACKAGE
52+ npm run test
53+ - uses : smartsquaregmbh/delete-old-packages@v0.8.1
54+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
55+ with :
56+ keep : 5
57+ names : ${{ matrix.package }}
58+ - name : Publish to Github Packages
59+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
60+ run : |
61+ python -m pip install setuptools_scm
62+ ./set_dev_version.sh
63+ echo "registry=https://npm.pkg.github.com/wq" > .npmrc
64+ echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
65+ cp .npmrc packages/$PACKAGE/.npmrc # for native builds
66+ cd packages/$PACKAGE
67+ npm publish
0 commit comments