Skip to content

Commit

Permalink
Adds test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xfbs committed Dec 28, 2023
1 parent e7b4b4c commit 0d2cd83
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Tests

on: [push, pull_request]

env:
RUSTFLAGS: -Dwarnings

jobs:
build_and_test:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust: [stable]

steps:
- uses: actions/checkout@v3

- name: Install ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true

- uses: Swatinem/rust-cache@v2

- name: tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all

check_fmt_and_docs:
name: Checking fmt and docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true

- uses: Swatinem/rust-cache@v2

- name: fmt
run: cargo fmt --all -- --check

- name: Clippy
run: cargo clippy --all

- name: Docs
run: cargo doc --no-deps

0 comments on commit 0d2cd83

Please sign in to comment.