Skip to content

Instantly share code, notes, and snippets.

@abhi3700
Created June 28, 2022 06:26
Show Gist options
  • Save abhi3700/19fd4ad808587e617dbd61eae54e7624 to your computer and use it in GitHub Desktop.
Save abhi3700/19fd4ad808587e617dbd61eae54e7624 to your computer and use it in GitHub Desktop.
"Github Action" - file
name: Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
env:
COIN_MARKET_CAP_API: ${{ secrets.COIN_MARKET_CAP_API }}
KOVAN: "witch collapse practice feed shame open despair creek road again ice least"
KOVAN_NETWORK_URL: ${{ secrets.KOVAN_NETWORK_URL }}
MAINNET: "witch collapse practice feed shame open despair creek road again ice least"
MAINNET_NETWORK_URL: ${{ secrets.MAINNET_NETWORK_URL }}
RINKEBY: "witch collapse practice feed shame open despair creek road again ice least"
RINKEBY_NETWORK_URL: ${{ secrets.KOVAN_NETWORK_URL }}
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
- name: NPM install cache
uses: c-hive/gha-yarn-cache@v2
- name: Install Node dependencies
run: yarn install
- name: Run Test
run: |
yarn test
yarn coverage
- uses: actions/upload-artifact@v3
with:
name: coverage-report
path: coverage/
@abhi3700
Copy link
Author

Create this file inside .github/ folder of your repo.

@abhi3700
Copy link
Author

This includes both running test & coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment