diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index fbcb60fb..22385b52 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -49,11 +49,29 @@ jobs: uses: jaywcjlove/coverage-badges-cli@main with: source: packages/${{ matrix.package }}/coverage/coverage-summary.json - output: packages/${{ matrix.package }}/coverage/${{ matrix.package }}-badge.svg + output: packages/${{ matrix.package }}/coverage/badge.svg + - name: Upload coverage report to artifact + uses: actions/upload-artifact@v3 + with: + name: coverage-${{ matrix.package }} + path: packages/${{ matrix.package }}/coverage + + deploy: + runs-on: ubuntu-latest + needs: coverage + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Download coverage artifacts + uses: actions/download-artifact@v3 + with: + path: coverage - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: packages/${{ matrix.package }}/coverage + publish_dir: coverage diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0227c1c1..ad6f4383 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Publish to npm +name: Publish env: CI: true on: diff --git a/README.md b/README.md index 61375882..90a9056c 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,19 @@ NPM Commitizen friendly + + coverage +

-https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AElfProject/aelf-web-login/feature/badge-json/release-refactor-3.0.0-base-test-results.json - -| Branch | GitHub Actions | Tests | Coverage | + + +| package | Tests | Coverage | +| --- | --- | --- | +| @aelf-web-login/utils | ![GitHub Workflow Test Status](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AElfProject/aelf-web-login/feature/badge-json/release-refactor-3.0.0-utils-test-results.json) | [![Coverage](https://aelfproject.github.io/aelf-web-login/coverage-utils/badge.svg)](https://github.com/AElfProject/aelf-web-login/actions) | +| @aelf-web-login/base | ![GitHub Workflow Test Status](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AElfProject/aelf-web-login/feature/badge-json/release-refactor-3.0.0-base-test-results.json) | [![Coverage](https://aelfproject.github.io/aelf-web-login/coverage-base/badge.svg)](https://github.com/AElfProject/aelf-web-login/actions) | # Install