-
Notifications
You must be signed in to change notification settings - Fork 32
106 lines (104 loc) · 3.09 KB
/
test.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Package Tests
on: [push, pull_request]
jobs:
npm:
name: "@wq/${{ matrix.package }}"
runs-on: ubuntu-20.04
env:
PACKAGE: ${{ matrix.package }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
node-version: [18]
package:
- app
- model
- outbox
- router
- store
- react
- material
- material-web
- material-native
- map
- map-gl
- map-gl-web
- map-gl-native
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: npm ci && npm run build
- name: Install native dependencies
if: matrix.package == 'material-native' || matrix.package == 'map-gl-native'
run: cd packages/$PACKAGE && npm ci
- name: Lint with ESLint
run: npm run lint
- name: Check ESM Imports
run: |
echo 'export default "0.0.0";' > version.js
sed -i "s/@mui\/material\/utils\/index.js/@mui\/material\/node\/utils\/index.js/" modules.js
node index.js
git checkout modules.js
- name: Start test server
run: python -m tests.server &
- name: Test with Jest
run: |
cd packages/$PACKAGE
npm run test
- uses: smartsquaregmbh/[email protected]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
keep: 5
names: ${{ matrix.package }}
- name: Publish to Github Packages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
python -m pip install setuptools_scm
./set_dev_version.sh
echo "registry=https://npm.pkg.github.com/wq" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
cp .npmrc packages/$PACKAGE/.npmrc # for native builds
cd packages/$PACKAGE
npm publish
pip:
name: Python Package
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.11"]
node-version: [18]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Node ${{ matrix.python-node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build Python Wheel
run: |
python -m build
python -m pip install `ls dist/*.whl`
- uses: actions/upload-artifact@v3
with:
name: wq.app
path: dist/*.whl