From fb06f00663c02084ce9d8786df8d65db9b41e665 Mon Sep 17 00:00:00 2001 From: wz2cool Date: Sat, 18 May 2024 17:14:25 +0800 Subject: [PATCH] Update webpack.yml --- .github/workflows/webpack.yml | 63 +++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index b1285dc..a100345 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/webpack.yml @@ -1,26 +1,47 @@ -on: ["push", "pull_request"] - -name: Test Coveralls +name: Tests +on: [push, pull_request] +env: + CI: true jobs: + test: + name: Node ${{ matrix.node }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + node: [14] + os: [ubuntu-latest] - build: - name: Build - runs-on: ubuntu-latest steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Install npm dependencies + run: npm install # switch to `npm ci` when Node.js 6 support is dropped - - uses: actions/checkout@v1 - - - name: Use Node.js 16.x - uses: actions/setup-node@v3 - with: - node-version: 16.x - - - name: npm install, make test-coverage - run: | - npm install - npm run coveralls - - name: Coveralls GitHub Action - uses: coverallsapp/github-action@v2.3.0 - with: - github-token: ${{ github.token }} + - name: Run tests + run: npm run test + + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: ${{matrix.os}}-node-${{ matrix.node }} + parallel: true + + finish: + needs: test + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true