Twap test structure #1087
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: Unit tests & Coverage | |
on: [push, pull_request] | |
env: | |
NODE_VERSION: lts/gallium | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Yarn cache | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Yarn install | |
run: | | |
mkdir .yarncache | |
yarn install --cache-folder ./.yarncache --frozen-lockfile | |
rm -rf .yarncache | |
yarn cache clean | |
- name: Run tests with coverage | |
run: yarn run test:coverage | |
if: env.COVERALLS_REPO_TOKEN != '' | |
- name: Run tests without coverage | |
run: yarn run test | |
if: env.COVERALLS_REPO_TOKEN == '' | |
- name: Comment in failing tests | |
uses: mattallty/[email protected] | |
if: failure() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
test-command: 'echo unit tests already executed' | |
coverage-comment: false | |
- name: Coveralls Report | |
uses: coverallsapp/[email protected] | |
if: (success() || failure()) && env.COVERALLS_REPO_TOKEN != '' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |