diff --git a/.github/workflows/test-long.yml b/.github/workflows/test-long.yml new file mode 100644 index 0000000000..f08bf645a6 --- /dev/null +++ b/.github/workflows/test-long.yml @@ -0,0 +1,134 @@ +name: Long Tests +on: + pull_request: + merge_group: + push: + branches: + - main + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }}-test-long + cancel-in-progress: true + +jobs: + test-integration: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + check-latest: true + cache: true + cache-dependency-path: go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + **/*.go + go.mod + go.sum + **/go.mod + **/go.sum + **/Makefile + Makefile + - name: integration tests + if: env.GIT_DIFF + run: | + make test-integration-cov + - uses: actions/upload-artifact@v3 + if: env.GIT_DIFF + with: + name: "${{ github.sha }}-integration-coverage" + path: ./tests/integration-profile.out + + test-e2e: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + check-latest: true + cache: true + cache-dependency-path: go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + **/*.go + go.mod + go.sum + **/go.mod + **/go.sum + **/Makefile + Makefile + - name: e2e tests + if: env.GIT_DIFF + run: | + make test-e2e-cov + - uses: actions/upload-artifact@v3 + if: env.GIT_DIFF + with: + name: "${{ github.sha }}-e2e-coverage" + path: ./tests/e2e-profile.out + + liveness-test: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + check-latest: true + cache: true + cache-dependency-path: go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + **/*.go + go.mod + go.sum + **/go.mod + **/go.sum + **/Makefile + Makefile + - name: start localnet + if: env.GIT_DIFF + run: | + make clean localnet-start + - name: test liveness + if: env.GIT_DIFF + run: | + ./contrib/localnet_liveness.sh 100 5 50 localhost + + test-sim-nondeterminism: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + check-latest: true + cache: true + cache-dependency-path: go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + **/*.go + go.mod + go.sum + **/go.mod + **/go.sum + **/Makefile + Makefile + - name: test-sim-nondeterminism + if: env.GIT_DIFF + run: | + make test-sim-nondeterminism diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 92b0dc9b1d..b8d9aa9f6f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,71 +82,9 @@ jobs: name: "${{ github.sha }}-${{ matrix.part }}-coverage" path: ./${{ matrix.part }}profile.out - test-integration: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: "1.20" - check-latest: true - cache: true - cache-dependency-path: go.sum - - uses: technote-space/get-diff-action@v6.1.2 - id: git_diff - with: - PATTERNS: | - **/*.go - go.mod - go.sum - **/go.mod - **/go.sum - **/Makefile - Makefile - - name: integration tests - if: env.GIT_DIFF - run: | - make test-integration-cov - - uses: actions/upload-artifact@v3 - if: env.GIT_DIFF - with: - name: "${{ github.sha }}-integration-coverage" - path: ./tests/integration-profile.out - - test-e2e: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: "1.20" - check-latest: true - cache: true - cache-dependency-path: go.sum - - uses: technote-space/get-diff-action@v6.1.2 - id: git_diff - with: - PATTERNS: | - **/*.go - go.mod - go.sum - **/go.mod - **/go.sum - **/Makefile - Makefile - - name: e2e tests - if: env.GIT_DIFF - run: | - make test-e2e-cov - - uses: actions/upload-artifact@v3 - if: env.GIT_DIFF - with: - name: "${{ github.sha }}-e2e-coverage" - path: ./tests/e2e-profile.out - repo-analysis: runs-on: ubuntu-latest - needs: [tests, test-integration, test-e2e] + needs: [tests] steps: - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.2 @@ -174,15 +112,6 @@ jobs: if: env.GIT_DIFF with: name: "${{ github.sha }}-03-coverage" - - uses: actions/download-artifact@v3 - if: env.GIT_DIFF - with: - name: "${{ github.sha }}-integration-coverage" - - uses: actions/download-artifact@v3 - if: env.GIT_DIFF - with: - name: "${{ github.sha }}-e2e-coverage" - continue-on-error: true - name: sonarcloud if: ${{ env.GIT_DIFF && !github.event.pull_request.draft }} uses: SonarSource/sonarcloud-github-action@master @@ -190,63 +119,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - liveness-test: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: "1.20" - check-latest: true - cache: true - cache-dependency-path: go.sum - - uses: technote-space/get-diff-action@v6.1.2 - id: git_diff - with: - PATTERNS: | - **/*.go - go.mod - go.sum - **/go.mod - **/go.sum - **/Makefile - Makefile - - name: start localnet - if: env.GIT_DIFF - run: | - make clean localnet-start - - name: test liveness - if: env.GIT_DIFF - run: | - ./contrib/localnet_liveness.sh 100 5 50 localhost - - test-sim-nondeterminism: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: "1.20" - check-latest: true - cache: true - cache-dependency-path: go.sum - - uses: technote-space/get-diff-action@v6.1.2 - id: git_diff - with: - PATTERNS: | - **/*.go - go.mod - go.sum - **/go.mod - **/go.sum - **/Makefile - Makefile - - name: test-sim-nondeterminism - if: env.GIT_DIFF - run: | - make test-sim-nondeterminism - ############################### #### Cosmos SDK Submodules #### ###############################