浏览代码

workflow: add frontend building step

wangweimin 5 年之前
父节点
当前提交
e7f591569c
共有 2 个文件被更改,包括 21 次插入1 次删除
  1. 10 0
      .github/workflows/release.yml
  2. 11 1
      .github/workflows/test.yml

+ 10 - 0
.github/workflows/release.yml

@@ -15,6 +15,16 @@ jobs:
         uses: actions/setup-python@v1
         with:
           python-version: 3.7
+      - name: Set up Node.js v13.5
+        uses: actions/setup-node@v1
+        with:
+          node-version: 13.5
+      - name: Build frontend
+        working-directory: ./webiojs
+        run: |
+          npm install
+          gulp
+          cp dist/pywebio.min.* ../pywebio/html/js
       - run: |
           pip3 install twine
           python3 setup.py sdist

+ 11 - 1
.github/workflows/test.yml

@@ -10,7 +10,17 @@ jobs:
         uses: actions/setup-python@v1
         with:
           python-version: 3.7
-      - name: Install JS deps
+      - name: Set up Node.js v13.5
+        uses: actions/setup-node@v1
+        with:
+          node-version: 13.5
+      - name: Build frontend
+        working-directory: ./webiojs
+        run: |
+          npm install
+          gulp
+          cp dist/pywebio.min.* ../pywebio/html/js
+      - name: Install Test JS deps
         run: npm install -D @percy/agent
       - name: Install package
         run: pip3 install -e ".[all]"