From 724ccdc664227deaff3e9cf2364b74167ffea48c Mon Sep 17 00:00:00 2001 From: clux Date: Sun, 4 Jul 2021 21:54:49 +0100 Subject: [PATCH 1/6] code coverage attempt with coveralls not for anything but internal use, it's not super useful as a metric. but good as an indicator for maintainers. --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e64c4f56..d59a6fb7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,3 +18,27 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: body_path: release.txt + code-coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install stable toolchain + #if: startsWith(github.ref, 'refs/tags/') + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Run cargo-tarpaulin + #if: startsWith(github.ref, 'refs/tags/') + uses: actions-rs/tarpaulin@v0.1 + with: + version: '0.18.0' + out-type: Lcov + args: '--all -- --test-threads 1' + - name: Coveralls Finished + uses: coverallsapp/github-action@master + #if: startsWith(github.ref, 'refs/tags/') + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: ./lcov.info From 573faaeef129da813520df789a576b8a72b5f475 Mon Sep 17 00:00:00 2001 From: clux Date: Sun, 4 Jul 2021 22:06:00 +0100 Subject: [PATCH 2/6] clippy + timeout --- .github/workflows/release.yml | 1 + kube/src/client/auth/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d59a6fb7d..361beb0e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,6 +35,7 @@ jobs: with: version: '0.18.0' out-type: Lcov + timeout: 500 args: '--all -- --test-threads 1' - name: Coveralls Finished uses: coverallsapp/github-action@master diff --git a/kube/src/client/auth/mod.rs b/kube/src/client/auth/mod.rs index 1659a4366..fd08e23d2 100644 --- a/kube/src/client/auth/mod.rs +++ b/kube/src/client/auth/mod.rs @@ -213,7 +213,7 @@ fn token_from_gcp_provider(provider: &AuthProviderConfig) -> Result Date: Sun, 4 Jul 2021 22:16:44 +0100 Subject: [PATCH 3/6] run on tag only --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 361beb0e0..cc8747a8a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,22 +24,22 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Install stable toolchain - #if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') uses: actions-rs/toolchain@v1 with: toolchain: stable override: true - name: Run cargo-tarpaulin - #if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') uses: actions-rs/tarpaulin@v0.1 with: version: '0.18.0' out-type: Lcov - timeout: 500 + timeout: 600 args: '--all -- --test-threads 1' - name: Coveralls Finished uses: coverallsapp/github-action@master - #if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: ./lcov.info From 2b904ae7d93bdea009c23a27ecd65c1197653a9c Mon Sep 17 00:00:00 2001 From: clux Date: Sun, 4 Jul 2021 22:26:51 +0100 Subject: [PATCH 4/6] exclude integration tests --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc8747a8a..f105a0ff0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: version: '0.18.0' out-type: Lcov timeout: 600 - args: '--all -- --test-threads 1' + args: '--all -e tests -- --test-threads 1' - name: Coveralls Finished uses: coverallsapp/github-action@master if: startsWith(github.ref, 'refs/tags/') From c7c723e0d2099c76bd69c06dbf705d0854d81cad Mon Sep 17 00:00:00 2001 From: clux Date: Sun, 4 Jul 2021 23:19:36 +0100 Subject: [PATCH 5/6] try limiting release to tag pushes --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f105a0ff0..0f00a615a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,9 @@ name: Release -on: push +on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' jobs: build: @@ -24,13 +27,11 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Install stable toolchain - if: startsWith(github.ref, 'refs/tags/') uses: actions-rs/toolchain@v1 with: toolchain: stable override: true - name: Run cargo-tarpaulin - if: startsWith(github.ref, 'refs/tags/') uses: actions-rs/tarpaulin@v0.1 with: version: '0.18.0' @@ -39,7 +40,6 @@ jobs: args: '--all -e tests -- --test-threads 1' - name: Coveralls Finished uses: coverallsapp/github-action@master - if: startsWith(github.ref, 'refs/tags/') with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: ./lcov.info From 0352757a62f0ec377069a8ad57825c615e17fd22 Mon Sep 17 00:00:00 2001 From: clux Date: Sun, 4 Jul 2021 23:21:08 +0100 Subject: [PATCH 6/6] seems to work --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f00a615a..123e1ff24 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,11 +12,9 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Extract release info from CHANGELOG - if: startsWith(github.ref, 'refs/tags/') run: grep $(date +%Y-%m-%d) -A 250 CHANGELOG.md | tail -n +3 | sed '1,/===================/!d' | head -n -3 > release.txt - name: Release uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: