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

Add workflow to check PRs (build/test/check_fmt) #18

Merged
merged 6 commits into from
Sep 28, 2024
Merged
Changes from 2 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
36 changes: 36 additions & 0 deletions .github/workflows/check_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI Check

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build_and_test:
runs-on: ubuntu-latest
name: Build and Test
needs: check-fmt
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Configure sccache env var and set build profile to ephemeral build
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
- run: cargo build --all
- run: cargo test --all

check-fmt:
runs-on: ubuntu-latest
name: Check formatting
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
with:
components: rustfmt
- run: cargo fmt --all -- --check
0xkubectl marked this conversation as resolved.
Show resolved Hide resolved