|
43 | 43 | echo "files size check failed" |
44 | 44 | exit 1 |
45 | 45 |
|
46 | | - test-and-build: |
| 46 | + build-web: |
| 47 | + name: build web packages |
| 48 | + runs-on: ubuntu-latest |
47 | 49 | needs: setup |
| 50 | + steps: |
| 51 | + - name: Checkout |
| 52 | + uses: actions/checkout@v2 |
| 53 | + with: |
| 54 | + repository: shinnytech/tqsdk-python-private |
| 55 | + ref: ${{ github.event.client_payload.ref }} |
| 56 | + token: ${{ secrets.GH_PAT }} |
| 57 | + submodules: 'recursive' |
| 58 | + |
| 59 | + - name: Setup Node.js 12.x |
| 60 | + uses: actions/setup-node@v1 |
| 61 | + with: |
| 62 | + node-version: 12.x |
| 63 | + |
| 64 | + - name: Package web |
| 65 | + run: | |
| 66 | + cd ./web/ |
| 67 | + yarn install --frozen-lockfile |
| 68 | + yarn run build |
| 69 | + env: |
| 70 | + CI: true |
| 71 | + |
| 72 | + - name: Upload web package |
| 73 | + uses: actions/upload-artifact@v2 |
| 74 | + with: |
| 75 | + name: web-files |
| 76 | + path: tqsdk/web/* |
| 77 | + |
| 78 | + test-and-build: |
| 79 | + needs: build-web |
48 | 80 | strategy: |
49 | 81 | matrix: |
50 | 82 | envinfo: |
@@ -82,20 +114,12 @@ jobs: |
82 | 114 | repository: shinnytech/tqsdk-python-private |
83 | 115 | ref: ${{ github.event.client_payload.ref }} |
84 | 116 | token: ${{ secrets.GH_PAT }} |
85 | | - submodules: 'recursive' |
86 | 117 |
|
87 | | - - name: Setup Node.js 12.x |
88 | | - uses: actions/setup-node@v1 |
| 118 | + - name: Download web-files |
| 119 | + uses: actions/download-artifact@v2 |
89 | 120 | with: |
90 | | - node-version: 12.x |
91 | | - |
92 | | - - name: Package web |
93 | | - run: | |
94 | | - cd ./web/ |
95 | | - yarn install --frozen-lockfile |
96 | | - yarn run build |
97 | | - env: |
98 | | - CI: true |
| 121 | + name: web-files |
| 122 | + path: ./tqsdk/web |
99 | 123 |
|
100 | 124 | - name: Set up Python |
101 | 125 | uses: actions/setup-python@v2 |
@@ -171,20 +195,12 @@ jobs: |
171 | 195 | repository: shinnytech/tqsdk-python-private |
172 | 196 | ref: ${{ github.event.client_payload.ref }} |
173 | 197 | token: ${{ secrets.GH_PAT }} |
174 | | - submodules: 'recursive' |
175 | 198 |
|
176 | | - - name: Setup Node.js 12.x |
177 | | - uses: actions/setup-node@v1 |
| 199 | + - name: Download web-files |
| 200 | + uses: actions/download-artifact@v2 |
178 | 201 | with: |
179 | | - node-version: 12.x |
180 | | - |
181 | | - - name: Package web |
182 | | - run: | |
183 | | - cd ./web/ |
184 | | - yarn install --frozen-lockfile |
185 | | - yarn run build |
186 | | - env: |
187 | | - CI: true |
| 202 | + name: web-files |
| 203 | + path: ./tqsdk/web |
188 | 204 |
|
189 | 205 | - name: Set up Python |
190 | 206 | uses: actions/setup-python@v2 |
@@ -233,6 +249,12 @@ jobs: |
233 | 249 | name: bdist-file |
234 | 250 | path: dist/*.whl |
235 | 251 |
|
| 252 | + - name: Upload sdist package |
| 253 | + uses: actions/upload-artifact@v2 |
| 254 | + with: |
| 255 | + name: sdist-file |
| 256 | + path: dist/*.tar.gz |
| 257 | + |
236 | 258 | - name: Upload doc package |
237 | 259 | uses: actions/upload-artifact@v2 |
238 | 260 | with: |
|
0 commit comments