mirror of
https://github.com/ionic-team/ionicons.git
synced 2026-11-30 16:48:16 +01:00
74 lines
2.1 KiB
YAML
74 lines
2.1 KiB
YAML
name: 'Validation'
|
|
|
|
on:
|
|
pull_request:
|
|
branches: ['**']
|
|
push:
|
|
branches: ['main']
|
|
|
|
# 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: true
|
|
|
|
jobs:
|
|
build-core:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
# Checkout the latest commit in this branch
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- uses: ./.github/workflows/actions/build-core
|
|
|
|
test-spec:
|
|
needs: [build-core]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/actions/test-spec
|
|
|
|
test-e2e:
|
|
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]
|
|
totalShards: [3]
|
|
needs: [build-core]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/actions/test-e2e
|
|
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-e2e:
|
|
if: ${{ always() }}
|
|
needs: test-e2e
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check build matrix status
|
|
if: ${{ needs.test-e2e.result != 'success' }}
|
|
run: exit 1
|