-
-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5628 from elasticspoon/parallel-tests
parallel_test gem experimentation
- Loading branch information
Showing
15 changed files
with
208 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "doc/**" | ||
- "**/*.md" | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
rspec: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
groups: ["[0, 1, 2, 3]", "[4, 5, 6, 7]", "[8, 9, 10, 11]"] | ||
uses: ./.github/workflows/rspec.yml | ||
secrets: inherit | ||
with: | ||
groups: ${{ matrix.groups }} | ||
group_count: 12 # the total number of test groups, must match the groups listed in the matrix.groups | ||
parallel_processes_count: 4 # the number of parallel processes to run tests in worker, must match the size of the | ||
# inner arrays in the matrix.groups | ||
combine_and_report: | ||
uses: ./.github/workflows/combine_and_report.yml | ||
needs: [rspec] | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
on: | ||
workflow_call: | ||
jobs: | ||
combine_and_report: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v4 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
- name: Decompress chunk test reports | ||
run: | | ||
find artifacts -name "test_reports*.zip" -exec unzip -d test_reports {} \; | ||
find test_reports -name "**/test_reports*.zip" -exec unzip -d test_reports {} \; | ||
- name: Merge parallel runtime log parts | ||
if: github.repository == github.event.pull_request.head.repo.full_name | ||
run: | | ||
cat artifacts/**/parallel_runtime_rspec*.log > parallel_runtime.log | ||
- name: Upload log file to Azure Blob Storage | ||
if: github.repository == github.event.pull_request.head.repo.full_name | ||
env: | ||
AZURE_STORAGE_KEY: ${{ secrets.STORAGE_ACCESS_KEY }} | ||
AZURE_STORAGE_ACCOUNT: ${{ secrets.ACCOUNT_NAME }} | ||
STORAGE_CONTAINER: ${{ secrets.STORAGE_CONTAINER }} | ||
run: | | ||
az storage blob upload \ | ||
-c $STORAGE_CONTAINER \ | ||
--file parallel_runtime.log \ | ||
-n parallel_runtime.log \ | ||
--overwrite true | ||
- name: Test Summary | ||
id: test_summary | ||
uses: test-summary/action@v2 | ||
with: | ||
paths: | | ||
test_reports/**/rspec*.xml | ||
- name: Set job status | ||
# In this step we set the status of the job. Normally in case of failures, the next steps fail, so we have to | ||
# use `if: always()` to make sure the next steps run. | ||
if: ${{ steps.test_summary.outputs.failed > 0 }} | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
core.setFailed('There are test failures') |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--format RspecJunitFormatter | ||
--out tmp/reports/rspec_<%= ENV["GROUPS_UNDERSCORE"] %>_<%= ENV["TEST_ENV_NUMBER"] %>.xml | ||
--format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime.log | ||
--format ParallelTests::RSpec::SummaryLogger --out tmp/spec_summary.log | ||
--format ParallelTests::RSpec::FailuresLogger --out tmp/failing_specs.log |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.