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

feat: enable CI for pull request #77

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
59 changes: 36 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: CI

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

env:
CARGO_TERM_COLOR: always
Expand All @@ -21,37 +22,49 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/cargo-install@v1
with:
crate: cargo-binstall
- run: cargo binstall -y --force cargo-risczero@${{ env.RISC0_VERSION }}
- run: cargo risczero install --version $RISC0_TOOLCHAIN_VERSION
- run: cargo test --workspace --all-targets --all-features
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/cargo-install@v1
with:
crate: cargo-binstall
- run: cargo binstall -y --force cargo-risczero@${{ env.RISC0_VERSION }}
- run: cargo risczero install --version $RISC0_TOOLCHAIN_VERSION
- run: cargo test --workspace --all-targets --all-features

clippy:
name: clippy
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/clippy-action@main
with:
reporter: 'github-pr-check'
fail_on_error: true
clippy_flags: --workspace --all-targets --all-features -- -Dwarnings
- uses: actions/checkout@v4
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/clippy-action@main
with:
reporter: "github-pr-check"
fail_on_error: true
clippy_flags: --workspace --all-targets --all-features -- -Dwarnings

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

lint:
name: lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: 🚀 Run yamllint
uses: frenck/action-yamllint@v1
with:
path: ".github/"
config: ".yamllint"
7 changes: 7 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: default

rules:
# 80 chars should be enough, but don't fail if a line is longer
line-length:
max: 80
level: warning