Skip to content

fix(subscan): a lock nobody could read is not a lock of zero #352

fix(subscan): a lock nobody could read is not a lock of zero

fix(subscan): a lock nobody could read is not a lock of zero #352

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
tags:
- 'v*.*.*'
pull_request:
jobs:
golangci:
name: Lint code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: latest
unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.25'
- name: Run unit tests
run: |
go test -v -race -coverprofile=coverage-unit.out -covermode=atomic ./...
integration-tests:
name: Run integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.25'
# Pinned to the version the release image installs: the integration suite
# runs the migrations, so it has to run them with the engine production
# uses, not with whatever the installer serves today.
- name: Install Atlas CLI
run: ATLAS_VERSION=v1.3.2 sh -c 'curl -sSf https://atlasgo.sh | sh'
- name: Run integration tests
run: |
go test -v -p 1 -tags=integration ./internal/store/postgres/... -coverprofile=coverage-integration.out
release:
name: Release
runs-on: ubuntu-latest
needs:
- golangci
- unit-tests
- integration-tests
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '^1.25'
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}