-
Notifications
You must be signed in to change notification settings - Fork 11
36 lines (33 loc) · 864 Bytes
/
check_pr.yaml
File metadata and controls
36 lines (33 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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/sccache-action@v0.0.6
- 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