mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore: remove legacy e2e tests (#27421)
Issue number: N/A --------- <!-- 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 generator migration is complete, so we can safely remove the legacy test infrastructure. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Removes the legacy test infrastructure ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Note: There's still a bit of sharding imbalance that I need to look into (test runner 17 is a few minutes longer than all the other test runners), but I will handle that in a separate PR.
This commit is contained in:
@@ -7,8 +7,6 @@ inputs:
|
||||
description: 'Playwright total number of test shards (ex: 4)'
|
||||
update:
|
||||
description: 'Whether or not to update the reference snapshots'
|
||||
commandModifier:
|
||||
description: 'Command modifier to run. This is should only be used to temporarily run legacy E2E tests as we migrate to the generator infrastructure.'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
@@ -27,7 +25,7 @@ runs:
|
||||
working-directory: ./core
|
||||
- name: Test
|
||||
if: inputs.update != 'true'
|
||||
run: npm run test.e2e${{ inputs.commandModifier }} -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }}
|
||||
run: npm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }}
|
||||
shell: bash
|
||||
working-directory: ./core
|
||||
- name: Test and Update
|
||||
@@ -49,14 +47,14 @@ runs:
|
||||
# which is why we not using the upload-archive
|
||||
# composite step here.
|
||||
run: |
|
||||
npm run test.e2e${{ inputs.commandModifier }} -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots
|
||||
npm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots
|
||||
git add src/\*.png --force
|
||||
mkdir updated-screenshots
|
||||
cd ../ && rsync -R --progress $(git diff --name-only --cached) core/updated-screenshots
|
||||
if [ -d core/updated-screenshots/core ]; then
|
||||
echo "hasUpdatedScreenshots=$(echo 'true')" >> $GITHUB_OUTPUT
|
||||
cd core/updated-screenshots
|
||||
zip -q -r ../../UpdatedScreenshots${{ inputs.commandModifier }}-${{ inputs.shard }}-${{ inputs.totalShards }}.zip core
|
||||
zip -q -r ../../UpdatedScreenshots-${{ inputs.shard }}-${{ inputs.totalShards }}.zip core
|
||||
fi
|
||||
shell: bash
|
||||
working-directory: ./core
|
||||
@@ -64,8 +62,8 @@ runs:
|
||||
if: inputs.update == 'true' && steps.test-and-update.outputs.hasUpdatedScreenshots == 'true'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: updated-screenshots${{ inputs.commandModifier }}-${{ inputs.shard }}-${{ inputs.totalShards }}
|
||||
path: UpdatedScreenshots${{ inputs.commandModifier }}-${{ inputs.shard }}-${{ inputs.totalShards }}.zip
|
||||
name: updated-screenshots-${{ inputs.shard }}-${{ inputs.totalShards }}
|
||||
path: UpdatedScreenshots-${{ inputs.shard }}-${{ inputs.totalShards }}.zip
|
||||
- name: Archive Test Results
|
||||
# The always() ensures that this step
|
||||
# runs even if the previous step fails.
|
||||
@@ -76,6 +74,6 @@ runs:
|
||||
if: always()
|
||||
uses: ./.github/workflows/actions/upload-archive
|
||||
with:
|
||||
name: test-results${{ inputs.commandModifier }}-${{ inputs.shard }}-${{ inputs.totalShards }}
|
||||
output: core/TestResults${{ inputs.commandModifier }}-${{ inputs.shard }}-${{ inputs.totalShards }}.zip
|
||||
name: test-results-${{ inputs.shard }}-${{ inputs.totalShards }}
|
||||
output: core/TestResults-${{ inputs.shard }}-${{ inputs.totalShards }}.zip
|
||||
paths: core/playwright-report
|
||||
|
||||
39
.github/workflows/build.yml
vendored
39
.github/workflows/build.yml
vendored
@@ -81,45 +81,6 @@ jobs:
|
||||
if: ${{ needs.test-core-screenshot.result != 'success' }}
|
||||
run: exit 1
|
||||
|
||||
test-core-screenshot-legacy:
|
||||
strategy:
|
||||
matrix:
|
||||
# Divide the tests into n buckets
|
||||
# and run those buckets in parallel.
|
||||
# To increase the number of shards,
|
||||
# add new items to the shard array
|
||||
# and change the value of totalShards
|
||||
# to be the length of the shard array.
|
||||
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
||||
totalShards: [20]
|
||||
needs: [build-core]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/workflows/actions/test-core-screenshot
|
||||
with:
|
||||
shard: ${{ matrix.shard }}
|
||||
totalShards: ${{ matrix.totalShards }}
|
||||
commandModifier: '.legacy'
|
||||
|
||||
# Screenshots are required to pass
|
||||
# in order for the branch to be merge
|
||||
# eligible. However, the screenshot tests
|
||||
# are run on n runners where n can change
|
||||
# over time. The verify-screenshots step allows
|
||||
# us to have a required status check for screenshot
|
||||
# results without having to manually add each
|
||||
# matrix run in the branch protection rules
|
||||
# Source: https://github.community/t/status-check-for-a-matrix-jobs/127354
|
||||
verify-screenshots-legacy:
|
||||
if: ${{ always() }}
|
||||
needs: test-core-screenshot-legacy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check build matrix status
|
||||
if: ${{ needs.test-core-screenshot-legacy.result != 'success' }}
|
||||
run: exit 1
|
||||
|
||||
build-vue:
|
||||
needs: [build-core]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
39
.github/workflows/stencil-nightly.yml
vendored
39
.github/workflows/stencil-nightly.yml
vendored
@@ -87,45 +87,6 @@ jobs:
|
||||
if: ${{ needs.test-core-screenshot.result != 'success' }}
|
||||
run: exit 1
|
||||
|
||||
test-core-screenshot-legacy:
|
||||
strategy:
|
||||
matrix:
|
||||
# Divide the tests into n buckets
|
||||
# and run those buckets in parallel.
|
||||
# To increase the number of shards,
|
||||
# add new items to the shard array
|
||||
# and change the value of totalShards
|
||||
# to be the length of the shard array.
|
||||
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
||||
totalShards: [20]
|
||||
needs: [build-core-with-stencil-nightly]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/workflows/actions/test-core-screenshot
|
||||
with:
|
||||
shard: ${{ matrix.shard }}
|
||||
totalShards: ${{ matrix.totalShards }}
|
||||
commandModifier: '.legacy'
|
||||
|
||||
# Screenshots are required to pass
|
||||
# in order for the branch to be merge
|
||||
# eligible. However, the screenshot tests
|
||||
# are run on n runners where n can change
|
||||
# over time. The verify-screenshots step allows
|
||||
# us to have a required status check for screenshot
|
||||
# results without having to manually add each
|
||||
# matrix run in the branch protection rules
|
||||
# Source: https://github.community/t/status-check-for-a-matrix-jobs/127354
|
||||
verify-screenshots-legacy:
|
||||
if: ${{ always() }}
|
||||
needs: test-core-screenshot-legacy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check build matrix status
|
||||
if: ${{ needs.test-core-screenshot-legacy.result != 'success' }}
|
||||
run: exit 1
|
||||
|
||||
build-vue:
|
||||
needs: [build-core-with-stencil-nightly]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user