From a390d992b912843d88a549bcb9ff30783e62eb2f Mon Sep 17 00:00:00 2001 From: Serge Radinovich <47865535+sergerad@users.noreply.github.com> Date: Mon, 6 Jan 2025 11:50:15 +1300 Subject: [PATCH] RM go.yml and add main.yaml workflows (#16) --- .github/workflows/go.yml | 23 -------------------- .github/workflows/main.yaml | 43 +++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/go.yml create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 0c673d15f..000000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: i386 linux tests - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - workflow_dispatch: - -jobs: - build: - runs-on: self-hosted - steps: - - uses: actions/checkout@v2 - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.21.4 - - name: Run tests - run: go test -short ./... - env: - GOOS: linux - GOARCH: 386 diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 000000000..af1d7861f --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,43 @@ +name: Build docker image, tag and push + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: # see this: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs + id-token: write # This is required for requesting the JWT + contents: write # This is required for actions/checkout + +jobs: + dev_docker_build_push: + if: ${{ github.ref == 'refs/heads/main' }} + uses: immutable/im-shared-github-actions/.github/workflows/docker-build-tag-push.yml@v1.3.1 + with: + environment: dev + dockerfile: "Dockerfile" + role-to-assume: "arn:aws:iam::783421985614:role/immutable-nonprod-docker-image-push" + role-session-name: "go-ethereum-immutable-nonprod-docker-image-push" + aws-region: "us-east-2" + go-mod-cache-path: "~/go/pkg/mod" + go-build-cache-path: "~/.cache/go-build" + secrets: + github-token: ${{ secrets.PLATFORM_SA_GITHUB_TOKEN }} + + tests: + name: Tests + runs-on: ubuntu-20-04-4-cores + timeout-minutes: 35 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v3 + with: + go-version: 1.20.x + - name: Cache modules + uses: ./.github/actions/cache/golang + - name: All Tests + shell: bash + run: | + go run build/ci.go install + go test $(go list ./... | grep -v 'go-ethereum/tests/immutable') -p 1 --parallel 4 -timeout=30m