From f59445ecf4bb8e970c054a56efd743604d7d1a5b Mon Sep 17 00:00:00 2001 From: Kelvin Wong <100633163+kwong0222@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:08:43 -0700 Subject: [PATCH 1/6] feat(): migrate to octocov --- .github/workflows/tests.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e296427..b0c384a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,19 +28,9 @@ jobs: name: coverage-results path: coverage retention-days: 5 + coverage: needs: rspec - runs-on: ubuntu-latest - steps: - - name: Download coverage results - uses: actions/download-artifact@v3 - with: - name: coverage-results - path: coverage - - - name: Simplecov Report - uses: aki77/simplecov-report-action@7fd5fa551dd583dd437a11c640b2a1cf23d6cdaa # v1.5.2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - failedThreshold: 100 - resultPath: coverage/.last_run.json + uses: rewindio/github-action-common/.github/workflows/coverage.yml@v1 + with: + fail_threshold: 100 From 55d329c28903a01b147633203b564fb381ac1d6d Mon Sep 17 00:00:00 2001 From: Kelvin Wong <100633163+kwong0222@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:43:52 -0700 Subject: [PATCH 2/6] feat(): migrate to octocov --- .github/workflows/tests.yml | 4 ++-- .octocov.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .octocov.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b0c384a..4cead73 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,6 +31,6 @@ jobs: coverage: needs: rspec - uses: rewindio/github-action-common/.github/workflows/coverage.yml@v1 + uses: k1LoW/octocov-action@1ad702b3118b6a055c00b01db68ca0d9f6641dbc # v1.4.0 with: - fail_threshold: 100 + config: .octocov.yml diff --git a/.octocov.yml b/.octocov.yml new file mode 100644 index 0000000..81f8f45 --- /dev/null +++ b/.octocov.yml @@ -0,0 +1,8 @@ +# generated by octocov init +coverage: + paths: coverage + acceptable: 100% +comment: + if: is_pull_request +summary: + if: true From 8c22b444efb695d22e347c964c8f53a69be6f451 Mon Sep 17 00:00:00 2001 From: Kelvin Wong <100633163+kwong0222@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:48:37 -0700 Subject: [PATCH 3/6] fix(): add coverage job --- .github/workflows/tests.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4cead73..96ceebe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,6 +31,9 @@ jobs: coverage: needs: rspec - uses: k1LoW/octocov-action@1ad702b3118b6a055c00b01db68ca0d9f6641dbc # v1.4.0 - with: - config: .octocov.yml + runs-on: ubuntu-latest + steps: + - name: Coverage report + uses: k1LoW/octocov-action@1ad702b3118b6a055c00b01db68ca0d9f6641dbc # v1.4.0 + with: + config: .octocov.yml From 0403bafccd925e2aa35486b260619fdc315f2f3d Mon Sep 17 00:00:00 2001 From: Kelvin Wong <100633163+kwong0222@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:55:36 -0700 Subject: [PATCH 4/6] allow octocov to discover config --- .github/workflows/tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 96ceebe..ad366ea 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,5 +35,3 @@ jobs: steps: - name: Coverage report uses: k1LoW/octocov-action@1ad702b3118b6a055c00b01db68ca0d9f6641dbc # v1.4.0 - with: - config: .octocov.yml From 145577e1c2a40aa42d322880ee5ee32cc33d8453 Mon Sep 17 00:00:00 2001 From: Kelvin Wong <100633163+kwong0222@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:29:27 -0700 Subject: [PATCH 5/6] download coverage artifact --- .github/workflows/tests.yml | 10 +++++++++- .octocov.yml | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ad366ea..7ed0cf3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: - name: Upload coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: include-hidden-files: 'true' name: coverage-results @@ -33,5 +33,13 @@ jobs: needs: rspec runs-on: ubuntu-latest steps: + - name: Download coverage results + uses: actions/download-artifact@v4 + with: + name: coverage-results + path: app/coverage + - name: Coverage report uses: k1LoW/octocov-action@1ad702b3118b6a055c00b01db68ca0d9f6641dbc # v1.4.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.octocov.yml b/.octocov.yml index 81f8f45..433f6ec 100644 --- a/.octocov.yml +++ b/.octocov.yml @@ -1,6 +1,7 @@ # generated by octocov init coverage: - paths: coverage + paths: + - coverage acceptable: 100% comment: if: is_pull_request From 3e7b4ead1f54aee667954ff7697f8e6b48b43b9f Mon Sep 17 00:00:00 2001 From: Kelvin Wong <100633163+kwong0222@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:31:51 -0700 Subject: [PATCH 6/6] feat(): add checkout step --- .github/workflows/tests.yml | 3 +++ .octocov.yml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7ed0cf3..7404b32 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,6 +33,9 @@ jobs: needs: rspec runs-on: ubuntu-latest steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Download coverage results uses: actions/download-artifact@v4 with: diff --git a/.octocov.yml b/.octocov.yml index 433f6ec..64a681e 100644 --- a/.octocov.yml +++ b/.octocov.yml @@ -1,7 +1,7 @@ # generated by octocov init coverage: - paths: - - coverage + paths: + - app/coverage acceptable: 100% comment: if: is_pull_request