diff --git a/.github/workflows/build.yml b/.github/workflows/ci.yml similarity index 70% rename from .github/workflows/build.yml rename to .github/workflows/ci.yml index 5e360f442a..3128fe478d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: PR Testing +name: ci on: push: @@ -9,7 +9,7 @@ on: pull_request: concurrency: - group: pr-testing-${{ github.head_ref || github.run_id }} + group: ci-${{ github.head_ref || github.run_id }} cancel-in-progress: true env: @@ -93,3 +93,35 @@ jobs: if: always() shell: bash run: rm -rf * + rpcimportable: + runs-on: ubuntu-20.04 + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.22' + - name: go get node + working-directory: contrib/rpcimportable + run: go get github.com/zeta-chain/node@${{github.event.pull_request.merge_commit_sha || github.sha}} + env: + GOPROXY: direct + - name: go mod tidy + working-directory: contrib/rpcimportable + run: go mod tidy + - 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 +