Skip to content

CI: have workflow install Yarn if not present #2

CI: have workflow install Yarn if not present

CI: have workflow install Yarn if not present #2

Workflow file for this run

name: Run unit tests
on: [push]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install yarn if not present
run: |-
if which yarn; then
exit
fi
curl -fsSL --create-dirs -o ~/bin/yarn \
https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js
chmod +x ~/bin/yarn
echo ~/bin >> "${GITHUB_PATH}"
- name: Use specified Node.js version
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
- name: Install dependencies
run: yarn install
- name: Compile
run: yarn compile
- name: Run linter
run: yarn lint
- name: Run unit tests
run: yarn test