Update checkin.yml to fix codecov failed #223
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint-and-unit-test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test-job: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Use Node.js 10.x" | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 10.x | |
- name: Install dependencies | |
run: yarn install | |
- name: Test code format | |
run: yarn lint | |
- name: Unit test and code covergae | |
run: | | |
docker-compose up -d mongo | |
export INDEXER_MODE=dmhy | |
export DB_MODE=localhost | |
export DB_PORT=27017 | |
export DB_USER=admin | |
export DB_NAME=dmhy_indexer | |
export DB_PASS=123456 | |
npm run check-coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} |