Skip to content

Commit be14dc4

Browse files
authored
chore(ci): persist updates to core/package.json in stencil nightly build (#30937)
<!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> The Stencil Nightly Build workflow tests Ionic with the latest nightly build of Stencil. The first step of the workflow updates Stencil, builds Ionic core, and uploads the build files. Later steps download these build files. Core's updated package.json is not uploaded with the build files, so later steps are installing an old Stencil version, leading to conflicts. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> Add core's package.json to the artifact upload. This will make all later steps use the correct Stencil version. Seven of the tests run `git diff` to ensure tests did not cause changes in tracked files. Core's package.json would register as a change, so a new step reverts package.json before running `git diff`. ## Does this introduce a breaking change? - [ ] Yes - [X] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent 364face commit be14dc4

File tree

9 files changed

+30
-2
lines changed

9 files changed

+30
-2
lines changed

.github/workflows/actions/build-angular/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ runs:
2727
run: npm run build
2828
shell: bash
2929
working-directory: ./packages/angular
30+
- name: Clean core package.json
31+
run: git checkout ./package.json
32+
shell: bash
33+
working-directory: ./core
3034
- name: 🔍 Check Diff
3135
run: git diff --exit-code
3236
shell: bash

.github/workflows/actions/build-core-stencil-prerelease/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ runs:
2929
with:
3030
name: ionic-core
3131
output: core/CoreBuild.zip
32-
paths: core/dist core/components core/css core/hydrate core/loader core/src/components.d.ts
32+
paths: core/dist core/components core/css core/hydrate core/loader core/src/components.d.ts core/package.json

.github/workflows/actions/build-react/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ runs:
3131
run: npm run test.spec
3232
shell: bash
3333
working-directory: ./packages/react
34+
- name: Clean core package.json
35+
run: git checkout ./package.json
36+
shell: bash
37+
working-directory: ./core
3438
- name: 🔍 Check Diff
3539
run: git diff --exit-code
3640
shell: bash

.github/workflows/actions/build-vue/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ runs:
2727
run: npm run build
2828
shell: bash
2929
working-directory: ./packages/vue
30+
- name: Clean core package.json
31+
run: git checkout ./package.json
32+
shell: bash
33+
working-directory: ./core
3034
- name: 🔍 Check Diff
3135
run: git diff --exit-code
3236
shell: bash

.github/workflows/actions/test-angular-e2e/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
- uses: ./.github/workflows/actions/download-archive
1818
with:
1919
name: ionic-angular
20-
path: ./angular
20+
path: ./packages/angular
2121
filename: AngularBuild.zip
2222
- uses: ./.github/workflows/actions/download-archive
2323
with:

.github/workflows/actions/test-core-clean-build/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ runs:
1212
name: ionic-core
1313
path: ./core
1414
filename: CoreBuild.zip
15+
- name: Clean core package.json
16+
run: git checkout ./package.json
17+
shell: bash
18+
working-directory: ./core
1519
- name: 🔍 Check Diff
1620
run: |
1721
git diff --exit-code || {

.github/workflows/actions/test-core-lint/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ runs:
1010
run: npm ci
1111
working-directory: ./core
1212
shell: bash
13+
- name: Clean core package.json
14+
run: git checkout ./package.json
15+
shell: bash
16+
working-directory: ./core
1317
- name: 🖌️ Lint
1418
run: npm run lint
1519
shell: bash

.github/workflows/actions/test-core-screenshot/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ runs:
3030
run: npm run test.e2e.docker.ci ${{ inputs.component }} -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }}
3131
shell: bash
3232
working-directory: ./core
33+
- name: Clean core package.json
34+
run: git checkout ./package.json
35+
shell: bash
36+
working-directory: ./core
3337
- name: Test and Update
3438
id: test-and-update
3539
if: inputs.update == 'true'

.github/workflows/actions/update-reference-screenshots/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ runs:
2121
find . -type f -name 'UpdatedScreenshots-*.zip' -exec unzip -q -o -d ../ {} \;
2222
shell: bash
2323
working-directory: ./artifacts
24+
- name: Clean core package.json
25+
run: git checkout ./package.json
26+
shell: bash
27+
working-directory: ./core
2428
- name: 📸 Push Screenshots
2529
# Configure user as Ionitron
2630
# and push only the changed .png snapshots

0 commit comments

Comments
 (0)