From 70572115642604a508b2e4612472faa13fd8b670 Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:56:12 +0100 Subject: [PATCH] ci: use rust action --- .github/workflows/release.yaml | 2 ++ .github/workflows/test-and-lint.yaml | 25 ++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5628778..c5c7f2d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 diff --git a/.github/workflows/test-and-lint.yaml b/.github/workflows/test-and-lint.yaml index b7046bf..ceffbd3 100644 --- a/.github/workflows/test-and-lint.yaml +++ b/.github/workflows/test-and-lint.yaml @@ -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 }} \ No newline at end of file +# - 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 }} \ No newline at end of file