From a7ae5d465c739de2d42b1fd37afa982e9cc716ed Mon Sep 17 00:00:00 2001 From: Tianyu Liu Date: Tue, 15 Jul 2025 17:33:27 +0200 Subject: [PATCH 1/3] try to upload coverage out --- .github/workflows/short-tests.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/short-tests.yml b/.github/workflows/short-tests.yml index ae0042f..0266fca 100644 --- a/.github/workflows/short-tests.yml +++ b/.github/workflows/short-tests.yml @@ -13,8 +13,16 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.23' + go-version: '1.24' - - name: Test + - name: Run short tests with coverage working-directory: ./src - run: go test -v --short ./... + run: | # TODO: at this moment only Home Assistant component is tested + go test -v --short ./components/homeassistant/... -cover -coverprofile=cover.out + - name: Upload coverage report + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: ./src/cover.out + retention-days: 1 + From cbdc1295f2e4a99bf4d8be1504e488604f14ec98 Mon Sep 17 00:00:00 2001 From: Tianyu Liu Date: Tue, 15 Jul 2025 17:37:47 +0200 Subject: [PATCH 2/3] Modify coverage upload --- .github/workflows/short-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/short-tests.yml b/.github/workflows/short-tests.yml index 0266fca..0f04573 100644 --- a/.github/workflows/short-tests.yml +++ b/.github/workflows/short-tests.yml @@ -22,7 +22,7 @@ jobs: - name: Upload coverage report uses: actions/upload-artifact@v4 with: - name: coverage-report - path: ./src/cover.out + name: coverage-report_build_${{ github.run_number }} + path: ${{ github.workspace }}/src/cover.out retention-days: 1 From 6fab12e7bdd885769fb0bccd5fc4d3ec24259ee6 Mon Sep 17 00:00:00 2001 From: Tianyu Liu Date: Tue, 15 Jul 2025 17:39:36 +0200 Subject: [PATCH 3/3] upload artifacts v3 --- .github/workflows/short-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/short-tests.yml b/.github/workflows/short-tests.yml index 0f04573..b2771e0 100644 --- a/.github/workflows/short-tests.yml +++ b/.github/workflows/short-tests.yml @@ -20,7 +20,7 @@ jobs: run: | # TODO: at this moment only Home Assistant component is tested go test -v --short ./components/homeassistant/... -cover -coverprofile=cover.out - name: Upload coverage report - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: coverage-report_build_${{ github.run_number }} path: ${{ github.workspace }}/src/cover.out