From 4baa96dd47f4c8c003cc55dd01a98d2ce49bac35 Mon Sep 17 00:00:00 2001 From: Rewrite0 Date: Thu, 15 Jun 2023 11:22:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8pnpm=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E5=8A=A0=E9=80=9F=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 57 +++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c278fb45..b82d5ae8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,21 +8,21 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.11 - uses: actions/setup-python@v3 - with: - python-version: "3.11" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f backend/requirements.txt ]; then pip install -r backend/requirements.txt; fi - pip install pytest - - name: Test - working-directory: ./backend/src - run: | - mkdir -p config - pytest + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f backend/requirements.txt ]; then pip install -r backend/requirements.txt; fi + pip install pytest + - name: Test + working-directory: ./backend/src + run: | + mkdir -p config + pytest build-webui: if: > @@ -30,25 +30,28 @@ jobs: (github.event_name == 'push' && github.ref_type == 'tag' && (contains(github.ref, 'alpha') || contains(github.ref, 'beta'))) runs-on: ubuntu-latest needs: [test] + strategy: + matrix: + node-version: [18] steps: - name: Checkout uses: actions/checkout@v3 - - name: Install Node.js + - uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - node-version: latest + node-version: ${{ matrix.node-version }} + cache: 'pnpm' - - uses: pnpm/action-setup@v2 - name: Install pnpm - id: pnpm-install - with: - version: latest - run_install: true + - name: Install dependencies + run: cd webui && pnpm install - name: Build run: | - cd webui pnpm build && zip -r dist.zip dist - name: Upload artifact @@ -57,7 +60,6 @@ jobs: name: dist path: webui/dist.zip - build-docker: runs-on: ubuntu-latest needs: [build-webui] @@ -147,9 +149,8 @@ jobs: (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || (github.event_name == 'push' && contains(github.ref, 'tags')) runs-on: ubuntu-latest - needs: [ build-docker ] + needs: [build-docker] steps: - - name: Checkout code uses: actions/checkout@v2 @@ -189,7 +190,7 @@ jobs: telegram: runs-on: ubuntu-latest - needs: [ release ] + needs: [release] steps: - name: send telegram message on push uses: appleboy/telegram-action@master From f54b9b4aedeb0e8353ead64e4467e6b2b31778be Mon Sep 17 00:00:00 2001 From: Rewrite0 Date: Thu, 15 Jun 2023 12:31:13 +0800 Subject: [PATCH 2/3] fix --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b82d5ae8..56251f0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'pnpm' + cache-dependency-path: webui/pnpm-lock.yaml - name: Install dependencies run: cd webui && pnpm install From e269834c258f8486fec9cdb163036d219bd0c378 Mon Sep 17 00:00:00 2001 From: Rewrite0 Date: Thu, 15 Jun 2023 12:36:59 +0800 Subject: [PATCH 3/3] fix ci --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 56251f0a..964cb56f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,7 +53,7 @@ jobs: - name: Build run: | - pnpm build && zip -r dist.zip dist + cd webui && pnpm build && zip -r dist.zip dist - name: Upload artifact uses: actions/upload-artifact@v3