feat(lint): impl erc20 transfer check using HIR #22539
Workflow file for this run
This file contains hidden or 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: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: full | |
jobs: | |
nextest: | |
uses: ./.github/workflows/nextest.yml | |
with: | |
profile: default | |
secrets: inherit | |
docs: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: Build documentation | |
run: cargo doc --workspace --all-features --no-deps --document-private-items | |
env: | |
RUSTDOCFLAGS: --cfg docsrs -D warnings --show-type-layout --generate-link-to-definition --enable-index-page -Zunstable-options | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./target/doc | |
deploy-docs: | |
if: github.ref_name == 'master' && github.event_name == 'push' | |
runs-on: ubuntu-latest | |
needs: [docs] | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
timeout-minutes: 30 | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
doctest: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- run: cargo test --workspace --doc | |
typos: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: crate-ci/typos@v1 | |
clippy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- run: cargo clippy --workspace --all-targets --all-features | |
env: | |
RUSTFLAGS: -Dwarnings | |
rustfmt: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- run: cargo fmt --all --check | |
forge-fmt: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: forge fmt | |
shell: bash | |
run: ./.github/scripts/format.sh --check | |
crate-checks: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: taiki-e/install-action@cargo-hack | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- run: cargo hack check | |
deny: | |
uses: ithacaxyz/ci/.github/workflows/deny.yml@main | |
ci-success: | |
runs-on: ubuntu-latest | |
if: always() | |
needs: | |
- nextest | |
- docs | |
- doctest | |
- typos | |
- clippy | |
- rustfmt | |
- forge-fmt | |
- crate-checks | |
- deny | |
timeout-minutes: 30 | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |