chore: overcome Codacy issue #6
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: coverage-to-codecov | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: "**" | |
permissions: | |
contents: read | |
jobs: | |
coverage: | |
name: Run tests, collect coverage, upload to Codecov | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js 20.10 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.10 | |
cache: 'npm' | |
- name: Copy .env file | |
run: cp .env.example .env | |
- name: Install dependencies | |
- run: npm install | |
- name: Run tests with coverage | |
- run: npx hardhat coverage | |
- name: Upload results to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |