chore(ci): run against stencil evaluation build (#26260)

this commit introduces the ability for the ionic framework to run it's
continuous integration (ci) suite using the latest commits in the
[stencil repository](https://github.com/ionic-team/stencil). the motivation
behind this is the ability for both the ionic framework and stencil
teams to have better insight as to whether a new version of stencil
will work correctly in the ionic framework. the intent here is that any
regressions can be caught and rectified by the appropriate team prior
to a release of either piece of software.

the stencil repository currently does not have the ability to publish
a "developer" release, or any other type of release that might otherwise
be considered for a "canary" or "nightly" release. the stencil team is
working towards this goal. however, we believe both teams can benefit
from this type of testing in the mean time. as such, we temporarily build
stencil from source and install the generated tarball in ci. this allows us
to begin to work through the operational issues related to having this
new integration without being reliant on a new publishing pipeline.

the job is introduced as a cron job, that runs in the early hours of the
morning. it closely resembles this repo's build step that runs on every
pr that's opened - with the difference of pulling down the stencil repo,
building the project, and installing the tarball
This commit is contained in:
Ryan Waskiewicz 2022-11-15 13:29:17 -05:00 committed by GitHub
parent e344d99426
commit 476e3a50e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 247 additions and 0 deletions

View File

@ -0,0 +1,50 @@
name: 'Build Ionic Core with Stencil Eval'
description: 'Build Ionic Core with an Evaluation Copy of Stencil'
runs:
using: 'composite'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install Dependencies
run: npm ci
working-directory: ./core
shell: bash
- name: Retrieve Stencil Repository
run: git clone https://github.com/ionic-team/stencil.git stencil-repo-tmp
shell: bash
- name: Report Stencil SHA
run: git rev-parse HEAD
working-directory: ./stencil-repo-tmp
shell: bash
- name: Build Stencil
run: npm ci && npm run build && npm pack
working-directory: ./stencil-repo-tmp
shell: bash
- name: Move the Stencil Build Artifact
# there isn't a great way to get the output of `npm pack`, just grab the first and hope for the best
run: mv $(ls ./stencil-repo-tmp/*.tgz | head -1) ./core/stencil-eval.tgz
shell: bash
- name: Install Stencil Eval
working-directory: ./core
run: npm i ./stencil-eval.tgz
shell: bash
- name: Clean Up Stencil Build
run: rm -rf stencil-repo-tmp
shell: bash
- name: Build Core
run: npm run build -- --ci
working-directory: ./core
shell: bash
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionic-core
output: core/CoreBuild.zip
paths: core/dist core/components core/css core/hydrate core/loader core/src/components.d.ts
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionic-core-src
output: core/CoreSrc.zip
paths: core/src

197
.github/workflows/stencil-eval.yml vendored Normal file
View File

@ -0,0 +1,197 @@
# 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'
# 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:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Checkout the latest commit in this branch
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/workflows/actions/build-core-stencil-eval
test-core-clean-build:
needs: [build-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-core-clean-build
test-core-lint:
needs: [build-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-core-lint
test-core-spec:
needs: [build-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-core-spec
test-core-e2e:
needs: [build-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-core-e2e
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]
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]
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]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/build-angular
build-angular-server:
needs: [build-angular]
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]
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:
needs: [build-react, build-react-router]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-react-router-e2e
test-react-e2e:
needs: [build-react, build-react-router]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-react-e2e