add github workflow

This commit is contained in:
Johannes Heuel
2022-08-22 20:49:24 +02:00
parent b4e9fd499f
commit 95863fccd0
2 changed files with 33 additions and 27 deletions

33
.github/workflows/rust.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: pre-commit
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
test:
name: tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test