Merge pull request #33 from GuoXiCheng/dev-c #21
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: Run Tests and Generate Coverage | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm install | |
- name: Run Jest tests | |
run: npm run test | |
env: | |
TEST_GITEE_TOKEN: ${{ secrets.TEST_GITEE_TOKEN }} | |
TEST_GITEE_OWNER: ${{ secrets.TEST_GITEE_OWNER }} | |
TEST_GITEE_REPO: ${{ secrets.TEST_GITEE_REPO }} | |
TEST_GITEE_NUMBER: ${{ secrets.TEST_GITEE_NUMBER }} | |
TEST_GITHUB_TOKEN: ${{ secrets.TEST_GITHUB_TOKEN }} | |
TEST_GITLAB_TOKEN: ${{ secrets.TEST_GITLAB_TOKEN }} | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |