Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .github/workflows/check-flake.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
name: Check Nix flake
on:
pull_request:
paths:
- '**.nix'
- flake.lock
workflow_dispatch:
# pull_request:
# paths:
# - "**.nix"
# - flake.lock
push:
branches:
- main
# branches:
# - main
# -
jobs:
check-flake:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: actions/checkout@v6
- uses: DeterminateSystems/nix-installer-action@v22
- uses: DeterminateSystems/magic-nix-cache-action@v13
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v5
with:
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@ name: Test and Validate
on:
push:
paths-ignore:
- '**.md'
- '.github/ISSUE_TEMPLATE/**'
- "**.md"
- ".github/ISSUE_TEMPLATE/**"
pull_request:
paths-ignore:
- '**.md'
- '.github/ISSUE_TEMPLATE/**'
- "**.md"
- ".github/ISSUE_TEMPLATE/**"

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v6

- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v6
with:
go-version: ^1.18

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Test
run: make test

Expand All @@ -31,17 +31,17 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6

- name: "Set up Go 1.x"
uses: actions/setup-go@v3
uses: actions/setup-go@v6
with:
go-version: 1.19

- name: Check out code
uses: actions/checkout@v3

- name: Lint with golanci-lint
uses: golangci/golangci-lint-action@v3
- name: Lint with golangci-lint
uses: golangci/golangci-lint-action@v9
with:
# version of golangci-lint to use
# Version should stay in sync with version used for local linting (lint job in Makefile).
version: v1.50.1
version: v2.12.2
8 changes: 4 additions & 4 deletions .github/workflows/update-flake-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
name: Update flake dependencies
on:
schedule:
- cron: '0 16 * * 5'
- cron: "0 16 * * 5"
workflow_dispatch: # for allowing manual triggers of the workflow
jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: actions/checkout@v6
- uses: DeterminateSystems/nix-installer-action@v22
- uses: DeterminateSystems/magic-nix-cache-action@v13
- name: Update flake.lock and create signed commit with flake.lock changes
env:
GITHUB_TOKEN: ${{ secrets.OP_BOT_TOKEN }}
Expand Down
27 changes: 14 additions & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
version: "2"
linters:
disable-all: true
default: none
enable:
# Defaults:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
# Extra:
- asciicheck
- bidichk
- depguard
- goimports
- gofmt

linters-settings:
depguard:
list-type: blacklist
include-go-root: false
packages:
- math/rand
packages-with-error-message:
- math/rand: "please use the safer crypto/rand"
settings:
depguard:
rules:
main:
deny:
- pkg: math/rand
desc: "please use the safer crypto/rand"

formatters:
enable:
- gofmt
- goimports
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test:

lint:
# Version used should stay in sync with version in CI (.github/workflows/test.yaml).
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.50.1 golangci-lint run
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v2.12.2 golangci-lint run

%/remove-local: beta-notice
$(eval plugin := $(firstword $(subst /, ,$@)))
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading