chore(web3): deprecate unused newrelic #386
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: GWOS Scripts Tests | |
on: | |
merge_group: | |
types: [checks_requested] | |
push: | |
paths: | |
- 'gwos/**' | |
- 'crates/tests/src/script_tests/**' | |
pull_request: | |
paths: | |
- 'gwos/**' | |
- 'crates/tests/src/script_tests/**' | |
jobs: | |
check-c-format: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# Note: cargo fmt is done in .github/workflows/rust.yml | |
- name: Check format of gwos/c | |
working-directory: gwos/c | |
run: make fmt | |
build-gwos-and-test-scripts: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Cache of Cargo | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-${{ runner.arch }}-cargo-gwos-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-${{ runner.arch }}-cargo-gwos | |
- name: Install moleculec | |
run: | | |
test "$(moleculec --version)" = "Moleculec 0.7.2" \ | |
|| cargo install moleculec --version 0.7.2 --force | |
- name: Install capsule | |
env: | |
CAPSULE_VERSION: v0.7.0 | |
run: | | |
(which capsule && test "$(capsule --version)" = "Capsule 0.7.0") \ | |
|| curl -OL https://github.com/nervosnetwork/capsule/releases/download/${CAPSULE_VERSION}/capsule_${CAPSULE_VERSION}_x86_64-linux.tar.gz \ | |
&& tar xf capsule_${CAPSULE_VERSION}_x86_64-linux.tar.gz \ | |
&& mv capsule_${CAPSULE_VERSION}_x86_64-linux/capsule ~/.cargo/bin/ \ | |
&& rm capsule_${CAPSULE_VERSION}_x86_64-linux.tar.gz \ | |
&& rm -rf capsule_${CAPSULE_VERSION}_x86_64-linux/ | |
capsule --version | |
- name: Compile C contracts of gwos | |
working-directory: gwos/c | |
run: make | |
- uses: actions/cache@v3 | |
id: fetch-capsule-cache | |
with: | |
path: | | |
gwos/.tmp/capsule-cache.tar | |
key: ${{ runner.os }}-capsule-cache-${{ hashFiles('contracts/Cargo.lock') }} | |
- name: Restore capsule cache | |
if: steps.fetch-capsule-cache.outputs.cache-hit == 'true' | |
working-directory: gwos | |
run: tools/restore-capsule-cache.sh | |
- name: Build Rust contracts | |
working-directory: gwos | |
run: capsule build | |
- name: Backup capsule cache | |
if: steps.fetch-capsule-cache.outputs.cache-hit != 'true' | |
working-directory: gwos | |
run: tools/backup-capsule-cache.sh | |
- name: Test C Uint256 | |
run: cargo test -p c-uint256-tests | |
- name: Script tests | |
run: cargo test --features scripts --features gw-config/no-builtin script_tests |