Skip to content

Commit

Permalink
feat(ci): add testing workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
  • Loading branch information
gierens committed Jun 28, 2024
1 parent fbb19f2 commit a83aa96
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: testing

on:
push:
branches:
- 'main'
paths:
- 'src/**/*'
- 'tests/**/*'
- '**/Cargo.toml'
- '**/Cargo.lock'
- 'docker-compose.yml'
- '.github/workflows/testing.yml'
pull_request:
branches:
- 'main'
paths:
- 'src/**/*'
- 'tests/**/*'
- '**/Cargo.toml'
- '**/Cargo.lock'
- 'docker-compose.yml'
- '.github/workflows/testing.yml'

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: test
runs-on: ubuntu-latest
# container:
# image: xd009642/tarpaulin
# options: --security-opt seccomp=unconfined
steps:
- name: checkout
uses: actions/checkout@v4
- name: install rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: install rust cache
uses: Swatinem/rust-cache@v2
- name: run tests
run: cargo test

coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: install rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: install rust cache
uses: Swatinem/rust-cache@v2
- name: run coverage check
uses: actions-rs/[email protected]
with:
version: '0.15.0'
args: '--workspace --fail-under 5 --exclude-files src/cli/* --exclude-files tests/*'

0 comments on commit a83aa96

Please sign in to comment.