Skip to content

Commit

Permalink
Add CLEAR_LOCK_FILES in .github/workflows to allow for up-to-date dep…
Browse files Browse the repository at this point in the history
…endencies
  • Loading branch information
PetrHeinz committed Mar 7, 2024
1 parent 6754217 commit 0f49d53
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
pull_request:
workflow_dispatch:

env:
CLEAR_LOCK_FILES: false

jobs:
tests:
runs-on: ubuntu-latest
Expand All @@ -17,6 +20,10 @@ jobs:
fail-fast: false

steps:
- name: Check variables
if: ${{ env.CLEAR_LOCK_FILES != 'true' && env.CLEAR_LOCK_FILES != 'false' }}
run: echo "Variable CLEAR_LOCK_FILES is ${{ env.CLEAR_LOCK_FILES }}, but should be 'true' or 'false'" && exit 1

- uses: actions/checkout@v3
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand All @@ -39,6 +46,10 @@ jobs:
- name: Setup yarn
run: npm install -g yarn

- name: Clear lock files
if: ${{ env.CLEAR_LOCK_FILES == 'true' }}
run: rm yarn.lock packages/*/yarn.lock

- name: Install dependencies
run: yarn install --frozen-lockfile

Expand Down

0 comments on commit 0f49d53

Please sign in to comment.