ci: use rust action

This commit is contained in:
daimond113 2024-10-30 19:56:12 +01:00
parent 678430f96f
commit 7057211564
No known key found for this signature in database
GPG key ID: 3A8ECE51328B513C
2 changed files with 14 additions and 13 deletions

View file

@ -33,6 +33,7 @@ jobs:
name: Build for ${{ matrix.host }}-${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Set env
shell: bash
run: |
@ -80,6 +81,7 @@ jobs:
needs: [ build ]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Publish
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} --allow-dirty --locked

View file

@ -11,19 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: moonrepo/setup-rust@v1
- uses: dtolnay/rust-toolchain@stable
with:
bins: cargo-tarpaulin
components: rustfmt, clippy
components: clippy, rustfmt
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install libdbus-1-dev pkg-config
- name: Run tests
run: cargo test --all --all-features
# pesde currently does not have any tests. Bring this back when (if) tests are added.
# - name: Run tests
# run: cargo test --all --all-features
- name: Check formatting
run: cargo fmt --all -- --check
@ -31,10 +30,10 @@ jobs:
- name: Run clippy
run: cargo clippy --all --all-targets --all-features -- -D warnings
- 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 }}
# - 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 }}