Skip to content

Commit

Permalink
fix: add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
0xkubectl committed Jul 27, 2024
1 parent 81b7d01 commit 4085660
Show file tree
Hide file tree
Showing 2 changed files with 38 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

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
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.79.0"

0 comments on commit 4085660

Please sign in to comment.