chore: merge main into develop #6484
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - release/** | |
| merge_group: | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| S3_BUCKET_PATH: "zetachain-deployment-files/builds/zeta-node" | |
| S3_PUBLIC_BUCKET_PATH: "zetachain-external-files" | |
| AWS_REGION: "us-east-1" | |
| GITHUB_REF_NAME: "$(echo ${{ github.ref_name }} | tr '//' '-')" | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - name: Test | |
| uses: nick-fields/retry@v3 | |
| with: | |
| timeout_minutes: 20 | |
| max_attempts: 2 | |
| retry_on: error | |
| command: | | |
| echo "Running Build Tests" | |
| make clean | |
| make test-coverage | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4.0.1 | |
| with: | |
| file: coverage.out | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: zeta-chain/node | |
| - name: Build zetacored and zetaclientd | |
| env: | |
| CGO_ENABLED: 1 | |
| GOOS: linux | |
| GOARCH: ${{ env.CPU_ARCH }} | |
| run: | | |
| make install install-zetae2e | |
| cp "$HOME"/go/bin/* ./ | |
| chmod a+x ./zetacored | |
| ./zetacored version | |
| - name: Upload zetacored | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: zetacored | |
| path: ~/go/bin/zetacored | |
| retention-days: 30 | |
| - name: Upload zetaclientd | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: zetaclientd | |
| path: ~/go/bin/zetaclientd | |
| retention-days: 30 | |
| - name: Upload zetae2e | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: zetae2e | |
| path: ~/go/bin/zetae2e | |
| retention-days: 90 | |
| - name: Clean Up Workspace | |
| if: always() | |
| shell: bash | |
| run: rm -rf * | |
| rpcimportable: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| # do not run this on forks as they are not installable | |
| # it will still be check in the merge queue in this case | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'zeta-chain/node' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - name: go get node | |
| working-directory: contrib/rpcimportable | |
| run: go get github.com/zeta-chain/node@${{github.event.pull_request.head.sha || github.sha}} | |
| env: | |
| GOPROXY: direct | |
| GOSUMDB: off | |
| - name: go mod tidy | |
| working-directory: contrib/rpcimportable | |
| run: go mod tidy | |
| - name: show go.mod | |
| working-directory: contrib/rpcimportable | |
| run: cat go.mod | |
| - name: go test | |
| working-directory: contrib/rpcimportable | |
| run: go test ./... | |
| ci-ok: | |
| runs-on: ubuntu-22.04 | |
| needs: | |
| - build-and-test | |
| - rpcimportable | |
| if: always() | |
| steps: | |
| - if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
| run: | | |
| echo "One of the jobs failed or was cancelled" | |
| exit 1 | |