From d3e82c99b8317bff0f3e5b98281748f8f0cf7c6b Mon Sep 17 00:00:00 2001 From: Ryan Waskiewicz Date: Tue, 15 Aug 2023 11:33:22 -0400 Subject: [PATCH] chore(ci): ensure stencil nightly gets installed for spec tests (#27974) Issue number: # --------- ## What is the current behavior? Stencil v3.4 is being used in the nightly run of these tests ## What is the new behavior? this commit updates the `test-core-spec` action to accept an argument for the version of stencil that should be installed/used. since we do not (and arguably, should not) cache `node_modules/`, we need a way to inform this action that a nightly version of stencil should be installed ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information I fully expect nightly CI to begin to fail as a result of merging this. We'll fix that next week (in Stencil) --- .github/workflows/actions/download-archive/action.yml | 2 +- .github/workflows/actions/test-core-spec/action.yml | 10 +++++++++- .github/workflows/stencil-nightly.yml | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions/download-archive/action.yml b/.github/workflows/actions/download-archive/action.yml index 736a484333..18108e506b 100644 --- a/.github/workflows/actions/download-archive/action.yml +++ b/.github/workflows/actions/download-archive/action.yml @@ -14,6 +14,6 @@ runs: with: name: ${{ inputs.name }} path: ${{ inputs.path }} - - name: Exract Archive + - name: Extract Archive run: unzip -q -o ${{ inputs.path }}/${{ inputs.filename }} shell: bash diff --git a/.github/workflows/actions/test-core-spec/action.yml b/.github/workflows/actions/test-core-spec/action.yml index 258b4c49d3..868baa009b 100644 --- a/.github/workflows/actions/test-core-spec/action.yml +++ b/.github/workflows/actions/test-core-spec/action.yml @@ -1,5 +1,8 @@ name: 'Test Core Spec' description: 'Test Core Spec' +inputs: + stencil-version: + description: 'The NPM tag of @stencil/core to install.' runs: using: 'composite' steps: @@ -7,9 +10,14 @@ runs: with: node-version: 16.x - name: Install Dependencies - run: npm install + run: npm ci working-directory: ./core shell: bash + - name: Install Stencil ${{ inputs.stencil-version }} + run: npm install @stencil/core@${{ inputs.stencil-version }} + shell: bash + working-directory: ./core + if: ${{ inputs.stencil-version != '' }} - uses: ./.github/workflows/actions/download-archive with: name: ionic-core diff --git a/.github/workflows/stencil-nightly.yml b/.github/workflows/stencil-nightly.yml index daa138b779..f6d33736f4 100644 --- a/.github/workflows/stencil-nightly.yml +++ b/.github/workflows/stencil-nightly.yml @@ -46,6 +46,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: ./.github/workflows/actions/test-core-spec + with: + stencil-version: nightly test-core-screenshot: strategy: