From d8e4f10c7343586bd7c01df4d73cde7bd247a58f Mon Sep 17 00:00:00 2001 From: skydread1 Date: Mon, 13 Nov 2023 19:50:37 +0800 Subject: [PATCH 1/2] Extract codecov job in dedicated yml file --- .github/workflows/codecov.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/main.yml | 7 +------ 2 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..c511dc7 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,31 @@ +name: Codecov + +on: + push: + branches: + - master + +permissions: write-all + +jobs: + upload-coverage: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + + - name: Install clojure tools + uses: DeLaGuardo/setup-clojure@12.1 + with: + cli: latest + + ## Kaocha with Cloverage generates codecov files + ## refer to tests.edn + - name: Run the clj tests + run: clojure -A:server/test + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 335ae4c..70453bb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: CI +name: Test and Build on: push: @@ -26,11 +26,6 @@ jobs: - name: Run the cljs tests run: clojure -A:web/test-headless - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: Build main.js run: clojure -T:build js-bundle From 278f041d64268543e2f340d348ef5691586a0770 Mon Sep 17 00:00:00 2001 From: skydread1 Date: Mon, 13 Nov 2023 19:55:19 +0800 Subject: [PATCH 2/2] Run codecov on any branch --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index c511dc7..daccee6 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -3,7 +3,7 @@ name: Codecov on: push: branches: - - master + - '**' permissions: write-all