feat: hardfork proposal feature (#1404) #4506
Workflow file for this run
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
name: Unit Tests | |
on: | |
push: | |
pull_request: | |
merge_group: | |
# Ensure that only a single job or workflow using the same concurrency group will run at a time. | |
# see https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
# only needs to test the group's latest commit | |
cancel-in-progress: true | |
jobs: | |
rust-test: | |
strategy: | |
matrix: | |
# Supported GitHub-hosted runners and hardware resources | |
# see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | |
os: [ubuntu-22.04] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache of Cargo | |
id: cargo-test-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-test | |
# See https://github.com/holmgr/cargo-sweep | |
- name: Cleaning up unused build files generated by Cargo | |
if: steps.cargo-test-cache.outputs.cache-hit != 'true' | |
run: | | |
which cargo-sweep >/dev/null && echo "cargo-sweep is installed" \ | |
|| (echo "cargo-sweep is not installed" && cargo install cargo-sweep) | |
cargo sweep --maxsize 8192 | |
- name: Run Rust unit-test | |
run: make test | |
other-unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Run metadata-test | |
run: make metadata-test | |
- name: Run crosschain-test | |
run: make crosschain-test |