diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 07c855b..bcd0de5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,9 +6,15 @@ on: - master pull_request: workflow_dispatch: - -env: - CLEAR_LOCK_FILES: false + inputs: + clearLockFiles: + description: 'Clear yarn.lock files?' + required: true + default: 'no' + type: choice + options: + - yes + - no jobs: tests: @@ -20,10 +26,6 @@ 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 @@ -47,7 +49,7 @@ jobs: run: npm install -g yarn - name: Clear lock files - if: ${{ env.CLEAR_LOCK_FILES == 'true' }} + if: ${{ inputs.clearLockFiles == 'yes' }} run: rm yarn.lock packages/*/yarn.lock - name: Install dependencies