Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved lint job into a new workflow #225

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,8 @@ env:
SCCACHE_BIN: /home/runner/.cache/cargo-sccache-bed5571c/bin/sccache

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install rust ${{ env.BUILD_TOOLCHAIN }}
uses: actions-rs/toolchain@v1
with:
# NOTE: Until https://github.com/actions-rs/toolchain/pull/209 is merged,
# this should be synced with rust-toolchain.toml file.
# After merge, this section should be removed.
# toolchain: stable-2023-08-24
toolchain: ${{ env.BUILD_TOOLCHAIN }}
components: rustfmt
profile: minimal

- name: Check Avail code formatting
uses: actions-rs/cargo@v1
with:
toolchain: ${{ env.BUILD_TOOLCHAIN }}
command: fmt
args: --check

- name: Check Avail-SubXt code formatting
uses: actions-rs/cargo@v1
with:
toolchain: ${{ env.BUILD_TOOLCHAIN }}
command: fmt
args: --manifest-path avail-subxt/Cargo.toml --check

build:
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v2

Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Lint Workflow

on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
env:
CARGO_SCCACHE_COMMIT: bed5571c
SCCACHE_DIR: /home/runner/.cache/cargo-sccache-bed5571c
SCCACHE_BIN: /home/runner/.cache/cargo-sccache-bed5571c/bin/sccache

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1

- name: Check Avail code formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --check

- name: Check Avail-SubXt code formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path avail-subxt/Cargo.toml --check
Loading