Skip to content

Commit

Permalink
Add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jordy25519 committed Dec 12, 2023
1 parent 1885ecd commit eb066a7
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 53 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build

on:
push:
branches:
- master
paths:
- "**.rs"
- "**.toml"
- "**.lock"
- ".github/workflows/*.yml"
pull_request:
branches:
- master
paths:
- "**.rs"
- "**.toml"
- "**.lock"
- ".github/workflows/*.yml"

jobs:
format-build-test:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Check out
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.73.0
components: rustfmt
default: true
- name: Init Cargo Cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Format
run: cargo fmt --all -- --check
- name: Build
run: cargo check --all
- name: Test
run: cargo test --all
Loading

0 comments on commit eb066a7

Please sign in to comment.