Skip to content

Instantly share code, notes, and snippets.

@ShariqT
Created January 6, 2022 00:33
Show Gist options
  • Save ShariqT/77e311bdc5f03ce5f63be2ac891f1653 to your computer and use it in GitHub Desktop.
Save ShariqT/77e311bdc5f03ce5f63be2ac891f1653 to your computer and use it in GitHub Desktop.
Main.yml
name: CI
on: [pull_request]
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['10.x', '12.x', '14.x']
os: [ubuntu-latest]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
- name: Test
run: yarn test --ci --coverage --maxWorkers=2
- name: Build
run: yarn build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment