From e83bcbac08772b63cd71fd60f6a023446a606305 Mon Sep 17 00:00:00 2001 From: Pantani Date: Thu, 28 Mar 2024 15:06:25 +0100 Subject: [PATCH] fix coverage files --- .github/workflows/test-integration.yml | 73 -------------------------- .github/workflows/test.yml | 5 +- 2 files changed, 3 insertions(+), 75 deletions(-) delete mode 100644 .github/workflows/test-integration.yml diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml deleted file mode 100644 index 0df79e2..0000000 --- a/.github/workflows/test-integration.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Integration - -on: - pull_request: - push: - paths-ignore: - - '**.md' - branches: - - main - - release/* - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - pre-test: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v4 - - name: Finding files and store to output - id: set-matrix - run: echo "matrix=$({ cd integration && find . -type d ! -name testdata -maxdepth 1 -print; } | tail -n +2 | cut -c 3- | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT - - integration: - name: test ${{ matrix.test-path }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - needs: pre-test - if: fromJSON(needs.pre-test.outputs.matrix)[0] != null - continue-on-error: false - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest, macos-latest] - test-path: ${{fromJson(needs.pre-test.outputs.matrix)}} - steps: - - uses: actions/checkout@v4 - - uses: technote-space/get-diff-action@v6.1.2 - with: - PATTERNS: | - **/*.go - **/*.plush - **/*.tpl - go.mod - go.sum - **/testdata/** - - - uses: actions/setup-go@v5 - if: env.GIT_DIFF - with: - go-version: 'stable' - - - name: Run Integration Tests - if: env.GIT_DIFF - env: - GOTOOLCHAIN: local+path - GOSUMDB: off - run: go test -v -timeout 120m ./integration/${{ matrix.test-path }} - - status: - runs-on: ubuntu-latest - needs: integration - if: always() - steps: - - name: Update result status - run: | - if [ "${{ needs.integration.result }}" = "failure" ]; then - exit 1 - else - exit 0 - fi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 207fda9..adc7dc3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ ubuntu-latest, macos-latest ] steps: - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6.1.2 @@ -37,7 +37,8 @@ jobs: cache: true cache-dependency-path: go.sum - - run: ./scripts/test-coverage + - name: Run tests + run: go test -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... $(go list github.com/ignite/gex/...) if: env.GIT_DIFF - name: Upload coverage to Codecov