mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
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. --> when the stencil team wants to test a dev build of stencil against the framework team's ci, they push a branch to this repo that overrides the stencil nightly job's npm tag (replacing 'nightly' with the dev build version) and manually kick off the nightly workflow. this commit would eliminate the need for that first step there ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> update the stencil nightly job to accept any npm release tag, rather than always default to 'nightly'. doing so allows the stencil team to reuse this workflow for cases where we'd like to test a _dev_ build of stencil by running it through the framework's ci process, without landing the feature in stencil first. I was able to test that `nightly` gets set by default (and the field is required) by running the workflow from this branch. I then also tested this against a dev build of Stencil:  Interestingly enough, it helped me catch something to consider if we were to accept the PR this dev build is accepted! ## 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 I considered making a separate workflow for this (rather than override/use nightly) - it didn't quite seem worth the maintenance effort 🤷 <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
228 lines
6.3 KiB
YAML
228 lines
6.3 KiB
YAML
# This workflow is intended to run against the `HEAD` of Stencil's primary branch.
|
|
# See https://github.com/ionic-team/stencil for contents of the repository
|
|
name: 'Stencil Nightly Build'
|
|
|
|
on:
|
|
schedule:
|
|
# Run every Monday-Friday
|
|
# at 6:00 UTC (6:00 am UTC)
|
|
- cron: '00 06 * * 1-5'
|
|
workflow_dispatch:
|
|
inputs:
|
|
npm_release_tag:
|
|
required: true
|
|
type: string
|
|
description: What version should be pulled from NPM?
|
|
default: nightly
|
|
|
|
# When pushing a new commit we should
|
|
# cancel the previous test run to not
|
|
# consume more runners than we need to.
|
|
concurrency:
|
|
group: ${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build-core-with-stencil-nightly:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/build-core-stencil-prerelease
|
|
with:
|
|
stencil-version: ${{ inputs.npm_release_tag || 'nightly' }}
|
|
|
|
test-core-clean-build:
|
|
needs: [build-core-with-stencil-nightly]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/test-core-clean-build
|
|
|
|
test-core-lint:
|
|
needs: [build-core-with-stencil-nightly]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/test-core-lint
|
|
|
|
test-core-spec:
|
|
needs: [build-core-with-stencil-nightly]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/test-core-spec
|
|
with:
|
|
stencil-version: ${{ inputs.npm_release_tag || 'nightly' }}
|
|
|
|
test-core-screenshot:
|
|
strategy:
|
|
# This ensures that all screenshot shard
|
|
# failures are reported so the dev can
|
|
# review everything at once.
|
|
fail-fast: false
|
|
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 }}
|
|
|
|
# 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:
|
|
if: ${{ always() }}
|
|
needs: test-core-screenshot
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check build matrix status
|
|
if: ${{ needs.test-core-screenshot.result != 'success' }}
|
|
run: exit 1
|
|
|
|
build-vue:
|
|
needs: [build-core-with-stencil-nightly]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/build-vue
|
|
|
|
build-vue-router:
|
|
needs: [build-vue]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/build-vue-router
|
|
|
|
test-vue-e2e:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
apps: [vue3]
|
|
needs: [build-vue, build-vue-router]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/test-vue-e2e
|
|
with:
|
|
app: ${{ matrix.apps }}
|
|
|
|
verify-test-vue-e2e:
|
|
if: ${{ always() }}
|
|
needs: test-vue-e2e
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check build matrix status
|
|
if: ${{ needs.test-vue-e2e.result != 'success' }}
|
|
run: exit 1
|
|
|
|
build-angular:
|
|
needs: [build-core-with-stencil-nightly]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/build-angular
|
|
|
|
build-angular-server:
|
|
needs: [build-core-with-stencil-nightly]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/build-angular-server
|
|
|
|
test-angular-e2e:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
apps: [ng12, ng13, ng14, ng15]
|
|
needs: [build-angular, build-angular-server]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/test-angular-e2e
|
|
with:
|
|
app: ${{ matrix.apps }}
|
|
|
|
verify-test-angular-e2e:
|
|
if: ${{ always() }}
|
|
needs: test-angular-e2e
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check build matrix status
|
|
if: ${{ needs.test-angular-e2e.result != 'success' }}
|
|
run: exit 1
|
|
|
|
build-react:
|
|
needs: [build-core-with-stencil-nightly]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/build-react
|
|
|
|
build-react-router:
|
|
needs: [build-react]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/build-react-router
|
|
|
|
test-react-router-e2e:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
apps: [reactrouter5]
|
|
needs: [build-react, build-react-router]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/test-react-router-e2e
|
|
with:
|
|
app: ${{ matrix.apps }}
|
|
|
|
verify-test-react-router-e2e:
|
|
if: ${{ always() }}
|
|
needs: test-react-router-e2e
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check build matrix status
|
|
if: ${{ needs.test-react-router-e2e.result != 'success' }}
|
|
run: exit 1
|
|
|
|
test-react-e2e:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
apps: [react17, react18]
|
|
needs: [build-react, build-react-router]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ./.github/workflows/actions/test-react-e2e
|
|
with:
|
|
app: ${{ matrix.apps }}
|
|
|
|
verify-test-react-e2e:
|
|
if: ${{ always() }}
|
|
needs: test-react-e2e
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check build matrix status
|
|
if: ${{ needs.test-react-e2e.result != 'success' }}
|
|
run: exit 1
|