using bootnodes in mainnet p2p #1236
Workflow file for this run
This file contains 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
# Copyright (c) 2024 Hemi Labs, Inc. | |
# Use of this source code is governed by the MIT License, | |
# which can be found in the LICENSE file. | |
# GitHub Actions workflow to lint, build and test. | |
name: "Go" | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
workflow_call: | |
concurrency: | |
group: "go-${{ github.workflow }}-${{ github.event.number || github.ref }}" | |
cancel-in-progress: "${{ github.event_name == 'pull_request' }}" | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: "Build" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
go-version: [ "1.23.x" ] | |
services: | |
postgres: | |
image: postgres:16.3-alpine3.20 | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_PASSWORD: "postgres" | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: "Setup Go ${{ matrix.go-version }}" | |
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
go-version: "${{ matrix.go-version }}" | |
cache: true | |
check-latest: true | |
- name: "Retrieve GOPATH" | |
id: retrieve | |
run: echo "GOPATH=$(go env GOPATH)" >> "$GITHUB_OUTPUT" | |
- name: "Setup GOPATH/bin cache" | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: "${{ steps.retrieve.outputs.GOPATH }}/bin/" | |
key: "${{ runner.os }}-${{ runner.arch }}-gobin-go${{ env.GO_VERSION }}-${{ hashFiles('**/Makefile') }}" | |
restore-keys: | | |
${{ runner.os }}-${{ runner.arch }}-gobin-go${{ env.GO_VERSION }}-${{ hashFiles('**/Makefile') }} | |
${{ runner.os }}-${{ runner.arch }}-gobin-go${{ env.GO_VERSION }}- | |
${{ runner.os }}-${{ runner.arch }}-gobin- | |
- name: "Download and verify dependencies" | |
id: deps | |
run: make GOCACHE="$(go env GOCACHE)" deps | |
- name: "make race" | |
run: make GOCACHE="$(go env GOCACHE)" race | |
- name: "make" | |
if: (success() || failure()) && steps.deps.outcome == 'success' | |
env: | |
PGTESTURI: "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" | |
HEMI_DOCKER_TESTS: "1" | |
run: | | |
make GOCACHE="$(go env GOCACHE)" | |
git diff --exit-code |