chore(ci): update web tests workflow to use Canyon action and adjust coverage reporting

This commit is contained in:
Travis Zhang 2026-03-20 16:53:01 +08:00
parent 27ed40225d
commit cd44371322
1 changed files with 6 additions and 12 deletions

View File

@ -1,10 +1,8 @@
name: Web Tests
on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: false
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
@ -55,8 +53,6 @@ jobs:
if: ${{ !cancelled() }}
needs: [test]
runs-on: ubuntu-latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
defaults:
run:
shell: bash
@ -83,13 +79,11 @@ jobs:
run: vp test --merge-reports --coverage --silent=passed-only
- name: Report coverage
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
uses: canyon-project/canyon-action@v1.0.24
with:
directory: web/coverage
flags: web
env:
CODECOV_TOKEN: ${{ env.CODECOV_TOKEN }}
coverage-file: web/coverage/coverage-final.json
canyon-url: https://app.canyonjs.io
instrument-cwd: ${{ github.workspace }}
web-build:
name: Web Build