Skip to content

Allow GitHub workflows to use other Yarn versions #117

Allow GitHub workflows to use other Yarn versions

Allow GitHub workflows to use other Yarn versions #117

Workflow file for this run

name: API Code QA
on:
push:
branches:
- main
paths:
- 'api/**.ts'
- 'api/package.json'
pull_request:
branches:
- main
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 19
- name: Install dependencies
run: |
cd ./api
yarn set version berry
yarn cache clean
export YARN_ENABLE_IMMUTABLE_INSTALLS=false
yarn install
- name: Configure Git
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git pull
- name: Run QA checks
continue-on-error: true
run: |
cd ./api
yarn run lint
- name: Commit changes
continue-on-error: true
run: |
git add .
git reset api/yarn.lock
git reset api/.yarnrc.yml
git reset api/package.json
git commit -m "[auto]: Fix code style"
git push
- name: Rerun QA checks
run: |
cd ./api
yarn run lint
yarn npm audit