Skip to content

Add bin/ dir to .gitignore #568

Add bin/ dir to .gitignore

Add bin/ dir to .gitignore #568

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Build
run: go build ./...
- name: Test with race detection (Linux/macOS)
if: matrix.os != 'windows-latest'
run: go test -race ./...
- name: Test (Windows)
if: matrix.os == 'windows-latest'
run: go test ./...
- name: Build with CGO disabled
run: go build ./...
env:
CGO_ENABLED: 0
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Test with coverage
# -p 1 serializes package execution to avoid ROBOREV_DATA_DIR race conditions
# between tests in different packages that modify this environment variable
run: go test -race -p 1 -coverprofile=coverage.out ./...
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
file: coverage.out
continue-on-error: true
integration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: roborev_test
POSTGRES_PASSWORD: roborev_test_password
POSTGRES_DB: roborev_test
ports:
- 5433:5432
options: >-
--health-cmd "pg_isready -U roborev_test -d roborev_test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Run integration tests
run: go test -tags=integration -v ./internal/storage/... -run Integration
env:
TEST_POSTGRES_URL: postgres://roborev_test:roborev_test_password@localhost:5433/roborev_test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
continue-on-error: true
nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Check flake
run: nix flake check
- name: Build package
run: nix build
- name: Verify binaries
run: ./result/bin/roborev version
- name: Verify nix apps
run: nix run .#roborev -- version