Skip to content

Commit

Permalink
Change CIs to use rust-toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
jungnoh committed Feb 16, 2024
1 parent 3863482 commit 07cd83e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/crdgen.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: crdgen

on:
push:
pull_request:

jobs:
crdgen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
- name: Check crdgen diff
run: cargo run --bin crdgen | diff helm/templates/crds/customresourcedefinition.yaml -
11 changes: 3 additions & 8 deletions .github/workflows/rustfmt.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
name: rustfmt

on:
push:
pull_request:

jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@1.71.1
with:
profile: minimal
toolchain: stable
components: rustfmt
- name: Check rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- run: cargo fmt --check
16 changes: 4 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
name: test

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
- name: Run test
uses: actions-rs/cargo@v1
with:
command: test
- run: cargo test

example-testcases:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
- name: Run example testcases
run: cargo run --bin checkpoint -- test $(find -type f -iname testcase.yaml)

0 comments on commit 07cd83e

Please sign in to comment.