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

tests: fix smoke shard total in CI #13844

Merged
merged 3 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/devtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
# e.g. if set 1 fails, continue with set 2 anyway
fail-fast: false
runs-on: macos-latest
name: DevTools smoke ${{ matrix.smoke-test-shard }}
name: DevTools smoke ${{ matrix.smoke-test-shard }}/${{ strategy.job-total }}

steps:
- name: git clone
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ jobs:
# e.g. if set 1 fails, continue with set 2 anyway
fail-fast: false
runs-on: ubuntu-latest
# Job named e.g. "Chrome stable, batch 1".
name: Chrome ${{ matrix.chrome-channel }}, batch ${{ matrix.smoke-test-shard }}
env:
# The total number of shards. Set dynamically when length of *single* matrix variable is
# computable. See https://github.community/t/get-length-of-strategy-matrix-or-get-all-matrix-options/18342
Comment on lines +21 to +22
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to change the wording here, as I assume it read like there is a solution (since the linked github discussion has an accepted solution), when really it was meant for background of the slightly different problem (multiple matrix dimensions) that isn't solved.

SHARD_TOTAL: 3
# Job named e.g. "Chrome stable 1/3".
name: Chrome ${{ matrix.chrome-channel }} ${{ matrix.smoke-test-shard }}/3

steps:
- name: git clone
Expand Down Expand Up @@ -49,7 +53,7 @@ jobs:
- run: sudo apt-get install xvfb
- name: Run smoke tests
run: |
xvfb-run --auto-servernum yarn c8 yarn smoke --debug -j=1 --retries=2 --shard=${{ matrix.smoke-test-shard }}/${{ strategy.job-total }}
xvfb-run --auto-servernum yarn c8 yarn smoke --debug -j=1 --retries=2 --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL
yarn c8 report --reporter text-lcov > smoke-coverage.lcov

- name: Upload test coverage to Codecov
Expand Down