Skip to content

Commit

Permalink
use concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Sep 19, 2023
1 parent fe67fd1 commit 0639912
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# generate by yq eval 'explode(.)' test.yml.src > test.yml
# https://github.com/mikefarah/yq

name: Test
on:
pull_request:
Expand All @@ -14,21 +15,14 @@ on:
- release-**
paths-ignore:
- '**/README.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
build:
runs-on: [self-hosted, linux]
env:
CARGO_INCREMENTAL: 0
needs: clean-up-actions
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -67,7 +61,6 @@ jobs:
runs-on: [self-hosted, linux]
env:
CARGO_INCREMENTAL: 0
needs: clean-up-actions
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -96,7 +89,6 @@ jobs:
runs-on: [self-hosted, linux]
env:
CARGO_INCREMENTAL: 0
needs: clean-up-actions
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -133,7 +125,6 @@ jobs:
runs-on: [self-hosted, linux]
env:
CARGO_INCREMENTAL: 0
needs: clean-up-actions
steps:
- uses: actions/checkout@v3
with:
Expand Down
38 changes: 24 additions & 14 deletions .github/workflows/test.yml.src
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,22 @@ on:
- release-**
paths-ignore:
- '**/README.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
build: &setup
runs-on:
[self-hosted, linux]
env:
CARGO_INCREMENTAL: 0
needs: clean-up-actions
steps:
- &checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
- &cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
Expand All @@ -51,8 +45,9 @@ jobs:
toolchain: nightly-2023-04-15
components: rustfmt
target: wasm32-unknown-unknown
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- &cmake
name: Setup cmake
uses: jwlawson/[email protected]
- name: Check format
run: cargo fmt --all -- --check
- name: Build
Expand All @@ -65,32 +60,47 @@ jobs:
run: cargo clippy --features with-karura-runtime -- -D warnings
- name: Run acala-runtime clippy
run: cargo clippy --features with-acala-runtime -- -D warnings
- name: Run build benches
run: make build-benches
benchmarking:
<<: *setup
steps:
- *checkout
- *cache
- *toolchain
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- *cmake
- name: Run benchmarking tests
run: make test-benchmarking
checks-and-tests:
<<: *setup
steps:
- *checkout
- *cache
- *toolchain
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- *cmake
- name: Run runtime tests
run: make test-runtimes
- name: Run eth tests
run: make test-eth

- name: Check benchmarks
run: make check-benchmarks
- name: Check try-runtime
run: make check-try-runtime
- name: Check runtimes
run: make check-runtimes
e2e-tests:
<<: *setup
steps:
- *checkout
- *cache
- *toolchain
- *cmake
- name: Run e2e tests
run: make test-e2e
- name: Use Node.js
uses: actions/setup-node@v3
with:
Expand Down

0 comments on commit 0639912

Please sign in to comment.