chore(deps): bump github.com/gorilla/websocket from 1.5.1 to 1.5.2 (#… #1291
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
name: build | |
on: | |
push: | |
branches: | |
- development | |
# Commented paths to avoid skipping required workflow | |
# See https://github.community/t/feature-request-conditional-required-checks/16761 | |
# paths: | |
# - .github/workflows/build.yml | |
# - "**/*.go" | |
# - "chain/**" | |
# - "cmd/**" | |
# - "dot/**" | |
# - "internal/**" | |
# - "lib/**" | |
# - "pkg/**" | |
# - "tests/**" | |
# - .dockerignore | |
# - .codecov.yml | |
# - Dockerfile | |
# - go.mod | |
# - go.sum | |
# - Makefile | |
jobs: | |
builds: | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
platform: [macos-latest, buildjet-4vcpu-ubuntu-2204] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
stable: true | |
check-latest: true | |
- name: Set cache variables | |
id: go-cache-paths | |
run: | | |
echo "::set-output name=go-build::$(go env GOCACHE)" | |
echo "::set-output name=go-mod::$(go env GOMODCACHE)" | |
- uses: actions/checkout@v4 | |
- name: Go build cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.go-cache-paths.outputs.go-build }} | |
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-go-build | |
- name: Go modules cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.go-cache-paths.outputs.go-mod }} | |
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-go-mod | |
- name: Run build | |
run: make build | |
publish-code-coverage: | |
timeout-minutes: 60 | |
runs-on: buildjet-4vcpu-ubuntu-2204 | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
stable: true | |
check-latest: true | |
- name: Set cache variables | |
id: go-cache-paths | |
run: | | |
echo "::set-output name=go-build::$(go env GOCACHE)" | |
echo "::set-output name=go-mod::$(go env GOMODCACHE)" | |
- uses: actions/checkout@v4 | |
- name: Go build cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.go-cache-paths.outputs.go-build }} | |
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-go-build | |
- name: Go modules cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.go-cache-paths.outputs.go-mod }} | |
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-go-mod | |
- name: Install Subkey | |
run: | | |
wget -P $HOME/.local/bin/ https://chainbridge.ams3.digitaloceanspaces.com/subkey-v2.0.0 | |
mv $HOME/.local/bin/subkey-v2.0.0 $HOME/.local/bin/subkey | |
chmod +x $HOME/.local/bin/subkey | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Generate coverage report | |
run: | | |
go test ./... -coverprofile=coverage.out -covermode=atomic -timeout=20m | |
- uses: codecov/[email protected] | |
with: | |
files: ./coverage.out | |
flags: unit-tests | |
name: coverage | |
verbose: true | |
docker-build-n-push: | |
runs-on: buildjet-4vcpu-ubuntu-2204 | |
env: | |
DOCKER_BUILDKIT: "1" | |
steps: | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: chainsafe/gossamer:latest |