Skip to content

Commit

Permalink
Enable corepack for GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
larixer committed Jun 5, 2024
1 parent 9b58e00 commit 8a41609
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@ name: Build and test webpack-virtual-modules

on:
push:
branches: [ master ]
branches: [master]
pull_request:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
webpack-version: [3, 4, 5]

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: |
./.yarn/releases
./.yarn/cache
key: ${{ runner.os }}-install-${{ hashFiles('yarn.lock') }}-v4

- name: 'Use Node.js 16.x'
uses: actions/setup-node@master
with:
node-version: 16.x

- name: Install Webpack ${{ matrix.webpack-version }}
run: |
yarn config set enableMirror false
yarn config set enableGlobalCache false
yarn add webpack@${{ matrix.webpack-version }}
- name: Run tests
run: yarn test
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: |
./.yarn/releases
./.yarn/cache
key: ${{ runner.os }}-install-${{ hashFiles('yarn.lock') }}-v4

- name: "Use Node.js 16.x"
uses: actions/setup-node@master
with:
node-version: 16.x

- name: Install Webpack ${{ matrix.webpack-version }}
run: |
corepack enable
yarn config set enableMirror false
yarn config set enableGlobalCache false
yarn add webpack@${{ matrix.webpack-version }}
- name: Run tests
run: yarn test

0 comments on commit 8a41609

Please sign in to comment.