Skip to content

Commit

Permalink
Add workflow to check PRs (build/test/check_fmt) (#18)
Browse files Browse the repository at this point in the history
* fix: add ci

* fix: remove rust-toolchain.toml - deemed unessecary

* Check Compile even when formatting is wrong

* Update sccache-action to 0.0.6

* Allow manual runs

---------

Co-authored-by: C0D3 M4513R <[email protected]>
  • Loading branch information
0xkubectl and C0D3-M4513R authored Sep 28, 2024
1 parent 9534a4e commit e1a32ba
Showing 1 changed file with 36 additions and 0 deletions.
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
workflow_dispatch:

jobs:
build_and_test:
runs-on: ubuntu-latest
name: Build and Test
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

0 comments on commit e1a32ba

Please sign in to comment.