Skip to content

ci: add CI workflows, golangci-lint config, and release pipeline #14

ci: add CI workflows, golangci-lint config, and release pipeline

ci: add CI workflows, golangci-lint config, and release pipeline #14

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
id-token: write
contents: read
concurrency:
group: tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint and format
runs-on: blacksmith-2vcpu-ubuntu-2404-arm
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Nix
uses: DeterminateSystems/determinate-nix-action@bafaa638b9d5ec0e7e3ac1a7fc80453ef1fd265f # v3.20.0
- name: Set up FlakeHub cache
uses: DeterminateSystems/flakehub-cache-action@1f9a51a2959d3e26c7838c6f3bf9f48acae525ea # v3.20.0
- name: Verify formatting
run: nix develop --command golangci-lint fmt --diff
- name: Run golangci-lint
run: nix develop --command golangci-lint run ./...
unit:
name: Unit tests
runs-on: blacksmith-2vcpu-ubuntu-2404-arm
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Nix
uses: DeterminateSystems/determinate-nix-action@bafaa638b9d5ec0e7e3ac1a7fc80453ef1fd265f # v3.20.0
- name: Set up FlakeHub cache
uses: DeterminateSystems/flakehub-cache-action@1f9a51a2959d3e26c7838c6f3bf9f48acae525ea # v3.20.0
- name: Run unit tests
run: nix develop --command go test ./...