From 89220de2bb7e166f2a02ab3ecf0c049adf7c1aa6 Mon Sep 17 00:00:00 2001 From: Dmitry Kireev Date: Mon, 10 Jun 2024 05:41:59 +0000 Subject: [PATCH] Fix E2E: WIP --- .../workflows/run.brew-and-apt-install-tests.yml | 1 + .github/workflows/run.e2e-tests.yml | 2 +- .github/workflows/run.unit-tests.yml | 16 ++++++++++++++-- internal/commands/gen_tfenv.go | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run.brew-and-apt-install-tests.yml b/.github/workflows/run.brew-and-apt-install-tests.yml index 52d5b167..e09be3bb 100644 --- a/.github/workflows/run.brew-and-apt-install-tests.yml +++ b/.github/workflows/run.brew-and-apt-install-tests.yml @@ -9,6 +9,7 @@ env: on: workflow_dispatch: + # TODO: Re-enable this after the tests are stable # schedule: # - cron: '0 3 * * */2' diff --git a/.github/workflows/run.e2e-tests.yml b/.github/workflows/run.e2e-tests.yml index 3be6c21a..998f4597 100644 --- a/.github/workflows/run.e2e-tests.yml +++ b/.github/workflows/run.e2e-tests.yml @@ -156,7 +156,7 @@ jobs: - name: Make Executable run: | chmod +rx "${{ github.workspace }}/bin/ize" - ize --version + ize --version - name: Create AWS Profile run: ize gen aws-profile diff --git a/.github/workflows/run.unit-tests.yml b/.github/workflows/run.unit-tests.yml index 191dfc4d..d11a1f2b 100644 --- a/.github/workflows/run.unit-tests.yml +++ b/.github/workflows/run.unit-tests.yml @@ -82,6 +82,7 @@ jobs: cat report.txt | go-junit-report -set-exit-code > report.xml else go test -v ./... -coverprofile=coverage.out -covermode=atomic 2>&1 ./... > report.txt + cat report.txt | go-junit-report -set-exit-code > report.xml fi - name: Publish Test Report @@ -90,5 +91,16 @@ jobs: with: report_paths: './report.xml' - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 + - name: Test Summary + uses: test-summary/action@v2 + if: always() + with: + paths: ./report.xml + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + files: coverage.out + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + name: coverage-${{ github.sha }} diff --git a/internal/commands/gen_tfenv.go b/internal/commands/gen_tfenv.go index 581d6d1f..c3f880d8 100644 --- a/internal/commands/gen_tfenv.go +++ b/internal/commands/gen_tfenv.go @@ -145,7 +145,7 @@ func GenerateTerraformFiles(name string, terraformStateBucketName string, projec ) if err != nil { pterm.Error.Printfln("Generate terraform file for \"%s\" not completed", name) - return fmt.Errorf("can't generate backent.tf: %s", err) + return fmt.Errorf("can't generate backend.tf: %s", err) } varsOpts := template.VarsOpts{