Skip to content

Merge branch 'feature/badge' of explorer.github.com:AElfProject/aelf-… #67

Merge branch 'feature/badge' of explorer.github.com:AElfProject/aelf-…

Merge branch 'feature/badge' of explorer.github.com:AElfProject/aelf-… #67

Workflow file for this run

name: Unit Test
on:
push:
branches:
- release/refactor-3.0.0
- feature/badge
pull_request:
branches:
- release/refactor-3.0.0
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
package: [utils]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Run tests with coverage
run: |
cd packages/${{ matrix.package }}
pnpm run test:coverage
- name: Uploada coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/${{ matrix.package }}/coverage/lcov.info
flags: unittests
name: codecov-umbrella
- name: Generate coverage badge
uses: jaywcjlove/coverage-badges-cli@main
with:
source: packages/${{ matrix.package }}/coverage/coverage-summary.json
output: packages/${{ matrix.package }}/coverage/badge.svg
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: packages/${{ matrix.package }}/coverage