test: use optimized assets #310
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Ionicons Build' | |
on: | |
pull_request: | |
branches: [ '**' ] | |
# 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@v3 | |
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@v3 | |
- 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@v3 | |
- 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 |