Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

Commit

Permalink
build: add GitHub action for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hseeberger committed Jun 8, 2022
1 parent efe7ba6 commit 12280ad
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Update Rust
run: |
rustup update
rustup toolchain install nightly
rustup component add rustfmt --toolchain nightly
- name: Set up 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: Check code formatting
run: cargo +nightly fmt --all --check
- name: Lint
run: cargo clippy -- -D warnings
- name: Test
run: cargo test

0 comments on commit 12280ad

Please sign in to comment.