Setup Github actions

This commit is contained in:
2022-01-10 15:26:37 +01:00
parent 77f66ed5d1
commit 06e9b8c501
2 changed files with 74 additions and 0 deletions

58
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
on: [push]
name: CI
jobs:
format:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
override: true
- uses: LoliGothick/rustfmt-check@v0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
flags: --all
options: --manifest-path=Cargo.toml
build_and_test:
name: Z2P NL
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- -D warnings
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.15.0'
args: '-- --test-threads 1'
- name: Upload to codecov.io
uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}}
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: cobertura.xml