Add codecov upload to GitHub actions #67
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
# Simple automation of tests on pushes to master branch | |
name: tests | |
on: | |
push: | |
branches: | |
- 'master' | |
# - 'next' | |
# pull_request: | |
# branches: | |
# - '*' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# single job for testing, linting and spellcheck | |
testing: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: yarn | |
- name: Run tests | |
run: TESTS_USE_MOCKNET=true yarn test -- -- --coverage --coverageProvider=v8 | |
- name: Run linter | |
run: yarn lint | |
- name: Run spellchecker | |
run: yarn spellcheck | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: CashScript/cashscript |