Skip to content

Commit

Permalink
chore: update yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
B4nan committed Nov 3, 2023
1 parent 87ee528 commit 712bc14
Show file tree
Hide file tree
Showing 3 changed files with 2,082 additions and 2,083 deletions.
71 changes: 35 additions & 36 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,45 @@
name: tests

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [14, 16, 18, 20]
node-version: [ 14, 16, 18, 20 ]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: EditorConfig Lint
uses: docker://mstruebing/editorconfig-checker:2.7.2

- name: Enable corepack
run: |
corepack enable
- name: Cache node_modules
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-16-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install
run: |
corepack prepare yarn@3.3.0 --activate
yarn
- name: Build
run: yarn build

- name: Lint
run: yarn lint

- name: Test
run: |
yarn coverage > COVERAGE_RESULT
echo "$(cat COVERAGE_RESULT)"
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn

- name: EditorConfig Lint
uses: docker://mstruebing/editorconfig-checker:2.7.2

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate
# Yarn dependencies cannot be cached until yarn is installed
# WORKAROUND: https://github.com/actions/setup-node/issues/531
- name: Extract cached dependencies
uses: actions/setup-node@v4
with:
cache: yarn
- name: Build
run: yarn build

- name: Lint
run: yarn lint

- name: Test
run: |
yarn coverage > COVERAGE_RESULT
echo "$(cat COVERAGE_RESULT)"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@
"engines": {
"node": ">= 14.0.0"
},
"packageManager": "yarn@3.6.4"
"packageManager": "yarn@4.0.1"
}
Loading

0 comments on commit 712bc14

Please sign in to comment.