Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: [IOPLT-798] Split test execution using shards #6500

Merged
merged 23 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/actions/setup-composite/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Actions to setup environment for all workflows
description: 'This action collects the steps to setup any job'
description: "This action collects the steps to setup any job"
runs:
using: "composite"
steps:
- id: setup-node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version-file: '.node-version'
node-version-file: ".node-version"
- id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
shell: bash
Expand All @@ -23,4 +23,14 @@ runs:
shell: bash
- id: generate-api-client
run: yarn generate
shell: bash
shell: bash
- id: upload-locales-artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8
with:
name: locales
path: locales/
- id: upload-clients-artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8
with:
name: api-client
path: definitions/
41 changes: 37 additions & 4 deletions .github/workflows/staticcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ on:
- pull_request
- workflow_call
jobs:
checks:
static-checks:
runs-on: ubuntu-latest
environment: dev
concurrency:
group: ${{ github.workflow }}-pr-staticcheck-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -19,9 +18,43 @@ jobs:
run: yarn lint
- id: run-prettier
run: yarn prettier:check
unit-test:
runs-on: ubuntu-latest
environment: dev
needs: static-checks
CrisTofani marked this conversation as resolved.
Show resolved Hide resolved
strategy:
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
steps:
- id: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- id: setup-node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version-file: ".node-version"
- id: yarn-cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- id: install-packages
run: yarn install --frozen-lockfile
- id: download-locales
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: locales
path: locales/
- id: download-api-client
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: api-client
path: definitions/
- id: run-test
run: yarn test:ci
run: yarn test:ci --shard=${{ matrix.shard }}/${{ strategy.job-total }}
- id: codecov-script
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
Loading