chore: adjust gas metering #27
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: Tests & Checks | |
on: [pull_request] | |
env: | |
GO_VERSION: 1.21.3 | |
# https://releases.rs/docs/1.80.0/ branch date | |
NIGHTLY_TOOLCHAIN: nightly-2024-06-07 | |
RUST_BACKTRACE: 1 | |
jobs: | |
go_fmt: | |
name: Go Fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: π₯ Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
check-latest: true | |
- name: π Lint Check | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
args: --timeout 10m --tests=false | |
working-directory: tallyvm | |
go_test: | |
name: Go Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: π₯ Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
check-latest: true | |
- name: π§ͺ Test | |
run: cd tallyvm && go test -v ./... | |
rust_fmt: | |
name: Rust Fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: π₯ Install Rust Nightly | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: nightly | |
components: rustfmt | |
- name: π Format Check | |
run: cargo fmt --all -- --check | |
rust_test_and_lint: | |
name: Rust Test & Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: β‘ Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: π₯¬ Use Mold Linker | |
uses: rui314/setup-mold@v1 | |
- name: π₯ Install Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }} | |
components: clippy rustc-codegen-cranelift-preview | |
- name: π Clippy Check | |
env: | |
RUSTFLAGS: -Zthreads=4 -Zshare-generics=y -Zcodegen-backend=cranelift | |
run: cargo clippy --all-features --locked -- -D warnings | |
- name: βοΈ Install Nextest | |
uses: taiki-e/install-action@nextest | |
- name: π§ͺ Test | |
env: | |
RUSTFLAGS: -Zthreads=4 -Zshare-generics=y -Zcodegen-backend=cranelift | |
run: cargo nextest run --locked -P ci | |
- name: βοΈ Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: π§ͺ Test Coverage | |
run: cargo cov-ci | |
- name: π Generate Code Coverage Report | |
uses: irongut/[email protected] | |
with: | |
filename: "cobertura.xml" | |
badge: true | |
fail_below_min: false | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: false | |
indicators: true | |
output: both | |
# thresholds: "10 30" | |
- name: π¬ Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
recreate: true | |
path: code-coverage-results.md |