Skip to content

Commit

Permalink
chore: Create CI action (#4)
Browse files Browse the repository at this point in the history
* Create CI action

* Checkout submodules

* Cancel in progress

* Add cargo fmt

* Add cargo clippy

* Add caching for clippy

* Use clippy action

* Add timeout
  • Loading branch information
Wollac authored Aug 9, 2023
1 parent ab844be commit f7107ac
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches: [ "main" ]
pull_request:

env:
CARGO_TERM_COLOR: always

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
name: test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/risc0/.github/actions/[email protected]
- name: Cargo test
run: cargo test --workspace

clippy:
name: clippy
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/risc0/.github/actions/[email protected]
- run: rustup component add clippy
- uses: risc0/clippy-action@main
with:
reporter: 'github-pr-check'
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: --workspace --all-targets --all-features -- -Dwarnings

fmt:
name: fmt
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: risc0/risc0/.github/actions/[email protected]
- run: cargo fmt --all --check

0 comments on commit f7107ac

Please sign in to comment.