Skip to content

Commit

Permalink
feat: update workflow templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Akagi201 committed Nov 26, 2024
1 parent 209d56e commit 96479e8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 40 deletions.
File renamed without changes.
49 changes: 18 additions & 31 deletions workflow-templates/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,26 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Toolchain
uses: actions-rs/toolchain@v1
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@main
with:
toolchain: nightly
target: wasm32-unknown-unknown
profile: minimal
components: rustfmt,clippy
override: true

- name: Cache
uses: Swatinem/rust-cache@v2

- name: Check
uses: actions-rs/cargo@v1
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
command: check
args: --release

- name: Test
uses: actions-rs/cargo@v1
components: clippy,rustfmt,miri
- uses: taiki-e/install-action@v2
with:
command: test

- name: Format
uses: actions-rs/cargo@v1
tool: cargo-sort,cargo-machete
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
command: fmt
args: --all -- --check

- name: Clippy
uses: actions-rs/clippy-check@v1
cache-on-failure: true
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all -- -D warnings
version: nightly
- name: Install Protoc
uses: arduino/setup-protoc@v3
24 changes: 15 additions & 9 deletions workflow-templates/super_linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,22 @@ jobs:
name: Super Linter
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write

steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0

- name: Run super-linter
uses: github/super-linter/slim@v4
- name: Super-linter
uses: super-linter/[email protected] # x-release-please-version
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# LINTER_RULES_PATH: .github/linters
# LINTER_RULES_PATH: .github/linters
# LINTER_RULES_PATH: .github/linters
# LINTER

0 comments on commit 96479e8

Please sign in to comment.