pesde/.github/workflows/test-and-lint.yaml

39 lines
1.1 KiB
YAML
Raw Normal View History

2024-03-04 20:18:49 +00:00
name: Test & Lint
on:
- push
- pull_request
env:
CARGO_TERM_COLOR: always
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2024-10-30 18:56:12 +00:00
- uses: dtolnay/rust-toolchain@stable
2024-03-04 20:18:49 +00:00
with:
2024-10-30 18:56:12 +00:00
components: clippy, rustfmt
2024-03-04 20:18:49 +00:00
2024-09-29 16:24:24 +01:00
- name: Install OS dependencies
run: |
sudo apt-get update
2024-09-29 16:25:53 +01:00
sudo apt-get install libdbus-1-dev pkg-config
2024-09-29 16:24:24 +01:00
2024-10-30 18:56:12 +00:00
# pesde currently does not have any tests. Bring this back when (if) tests are added.
# - name: Run tests
# run: cargo test --all --all-features
2024-03-04 20:18:49 +00:00
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all --all-targets --all-features -- -D warnings
2024-03-04 20:18:49 +00:00
2024-10-30 18:56:12 +00:00
# - name: Generate coverage report
# run: cargo tarpaulin --all-features --out xml --exclude-files src/cli/* --exclude-files registry/* --exclude-files src/main.rs --skip-clean
#
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v4.0.1
# with:
# token: ${{ secrets.CODECOV_TOKEN }}