Skip to content

Commit

Permalink
separate workflow for build and check
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Fadhlika committed Aug 20, 2021
1 parent df0cfeb commit 38ddd36
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Build
on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
Expand Down Expand Up @@ -42,19 +40,3 @@ jobs:
branch: repo
force: true
directory: repo
fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
23 changes: 23 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check

on:
pull_request:
branches: [master]

jobs:
fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

0 comments on commit 38ddd36

Please sign in to comment.