Composite action that will check out our code, set up node and yarn with caching, and install yarn dependencies
brianespinosa/checkout-setup-node-install@main
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: brianespinosa/checkout-setup-node-install@main
- run: yarn lint
test:
runs-on: ubuntu-latest
steps:
- uses: brianespinosa/checkout-setup-node-install@main
- run: yarn test
build:
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: brianespinosa/checkout-setup-node-install@main
- run: yarn build
- We are using a modern version (v2+) of
yarn
as a package manager - We are using a
.nvmrc
file to define the version ofnode
to use - We do not need to checkout the entire git history (tags, etc)
- We do not want to change the
yarn.lock
file at all during install