Skip to content

Commit

Permalink
[gha] split code gen unit tests out, bump unit test timeout by 10 min…
Browse files Browse the repository at this point in the history
…utes.

Closes: diem#7782
  • Loading branch information
rexhoffman authored and bors-libra committed Mar 2, 2021
1 parent a8c928e commit 0cea341
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:

unit-test:
runs-on: ubuntu-latest-xl
timeout-minutes: 40
timeout-minutes: 50
needs: prepare
if: ${{ needs.prepare.outputs.test-rust == 'true' }}
container:
Expand Down Expand Up @@ -167,6 +167,31 @@ jobs:
TARGET_BRANCH: ${{ needs.prepare.outputs.changes-target-branch }}
SCCACHE_AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_AWS_ACCESS_KEY_ID }}
SCCACHE_AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_AWS_SECRET_ACCESS_KEY }}
- uses: ./.github/actions/build-teardown

codegen-unit-test:
runs-on: ubuntu-latest-xl
timeout-minutes: 60
needs: prepare
if: ${{ needs.prepare.outputs.test-rust == 'true' }}
container:
image: diem/build_environment:${{ needs.prepare.outputs.changes-target-branch }}
volumes:
- "/home/runner/work/diem/diem:/opt/git/diem"
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 #get all the history!!!
- uses: ./.github/actions/check-machine
with:
webhook-gha-hardware: ${{ secrets.WEBHOOK_GHA_HARDWARE }}
- uses: ./.github/actions/build-setup
- uses: actions/[email protected]
with:
path: "/opt/cargo/git\n/opt/cargo/registry\n/opt/cargo/.package-cache"
key: crates-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: "crates-${{ runner.os }}"
- name: run codegen unit tests
run: $pre_command && cargo x test --jobs ${max_threads} -p transaction-builder-generator --unit --changed-since "origin/$TARGET_BRANCH" -- --ignored
env:
Expand Down Expand Up @@ -267,8 +292,8 @@ jobs:
webhook-gha-hardware: ${{ secrets.WEBHOOK_GHA_HARDWARE }}
- name: install expect
run: |
sudo apt --assume-yes update
sudo apt --assume-yes install expect
sudo apt --assume-yes update
sudo apt --assume-yes install expect
- name: build validator docker image
run: docker/diem-build.sh docker/validator/Dockerfile libra/validator:test
- name: build faucet image
Expand Down Expand Up @@ -409,6 +434,7 @@ jobs:
- non-rust-lint
- lint
- unit-test
- codegen-unit-test
- e2e-test
- docker-compose-test
- crypto-unit-test
Expand All @@ -421,6 +447,7 @@ jobs:
echo non-rust-lint: ${{ needs.non-rust-lint.result }}
echo lint: ${{ needs.lint.result }}
echo unit-test: ${{ needs.unit-test.result }}
echo codegen-unit-test: ${{ needs.codegen-unit-test.result }}
echo e2e-test: ${{ needs.e2e-test.result }}
echo docker-compose-test: ${{ needs.docker-compose-test.result }}
echo crypto-unit-test: ${{ needs.crypto-unit-test.result }}
Expand All @@ -432,6 +459,7 @@ jobs:
&& (needs.non-rust-lint.result=='success' || needs.non-rust-lint.result=='skipped')
&& (needs.lint.result=='success' || needs.lint.result=='skipped')
&& (needs.unit-test.result=='success' || needs.unit-test.result=='skipped')
&& (needs.codegen-unit-test.result=='success' || needs.codegen-unit-test.result=='skipped')
&& (needs.e2e-test.result=='success' || needs.e2e-test.result=='skipped')
&& (needs.docker-compose-test.result=='success' || needs.docker-compose-test.result=='skipped')
&& (needs.crypto-unit-test.result=='success' || needs.crypto-unit-test.result=='skipped')
Expand Down

0 comments on commit 0cea341

Please sign in to comment.