Remove console.log
from test
#208
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: Main | |
on: | |
# We want to trigger these jobs in every branch. | |
push: | |
# But do not trigger them when only `md` files were modified. | |
paths-ignore: | |
- '**.md' | |
# `FORCE_COLOR` is used by `chalk`, which is used internally by `mocha`. | |
# https://github.com/chalk/chalk#supportscolor | |
# https://github.com/orgs/community/discussions/26944#discussioncomment-3254075 | |
env: | |
FORCE_COLOR: 3 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: echo "NODE_VERSION=`node --version`" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- run: yarn install --frozen-lockfile | |
- run: yarn compile | |
- run: yarn lint | |
- run: yarn bundle | |
test: | |
strategy: | |
# Runs all node versions using the same `os` in parallel | |
max-parallel: 2 | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
# https://nodejs.dev/en/about/releases/ | |
node: [18, 20] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-${{ matrix.node }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- run: yarn install --frozen-lockfile | |
- run: yarn test | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: echo "NODE_VERSION=`node --version`" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- run: yarn install --frozen-lockfile | |
- run: yarn coverage |