Skip to content

Commit

Permalink
taskfile ci integration
Browse files Browse the repository at this point in the history
Signed-off-by: Horiodino <[email protected]>
  • Loading branch information
Horiodino committed Jun 2, 2024
1 parent a141748 commit 3b307fb
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 124 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Taskfile CI

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v17

- name: Install Task
uses: arduino/setup-task@v1

- name: go test
run: nix develop bsf/.#devShell --command task test

- name: go lint
run: nix develop bsf/.#devShell --command task lint
14 changes: 14 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
linters-settings:
deadcode:
skip-files: "_test\\.go$"
govet:
check-shadowing: false
golint:
exclude-use-default-exported: true
exclude-useless-naming: true
gosec:
tests: true
unused:
check-exported: true
check-blank: true
check-tests: true
12 changes: 12 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'

tasks:
test:
desc: "Run all Go tests"
cmds:
- go test ./...

lint:
desc: "Run golangci-lint"
cmds:
- golangci-lint run
9 changes: 5 additions & 4 deletions bsf.hcl
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@

packages {
development = ["go@1.22.0", "delve@^1.22.0", "gotools@~0.7.0", "goreleaser@^1.24.0"]
development = ["go@1.21.6", "[email protected]", "[email protected]", "go-task@~3.37.2", "golangci-lint@~1.59.0"]
runtime = ["[email protected]"]
}

gomodule {
name = "bsf"
src = "./."
name = "bsf"
src = "./."
ldFlags = null
tags = null
doCheck = false
}

203 changes: 124 additions & 79 deletions bsf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
{
"package": {
"name": "go",
"revision": "5a7b241264578c55cd25aa7422121aef072ce588",
"version": "1.22.0",
"revision": "a731d0cb71c58f56895f71a5b02eda2962a46746",
"version": "1.21.6",
"description": "The Go Programming language",
"homepage": "https://go.dev/",
"free": true,
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1707509006,
"epoch_seconds": 1705066566,
"platforms": [
"x86_64-darwin",
"i686-darwin",
Expand All @@ -39,21 +39,20 @@
"s390-linux",
"s390x-linux",
"x86_64-linux"
],
"attr_name": "go_1_22"
]
},
"runtime": false
},
{
"package": {
"name": "goreleaser",
"revision": "5a7b241264578c55cd25aa7422121aef072ce588",
"version": "1.24.0",
"description": "Deliver Go binaries as fast and easily as possible",
"homepage": "https://goreleaser.com",
"name": "gotools",
"revision": "ac5c1886fd9fe49748d7ab80accc4c847481df14",
"version": "0.16.1",
"description": "Additional tools for Go development",
"homepage": "https://go.googlesource.com/tools",
"free": true,
"spdx_id": "MIT",
"epoch_seconds": 1707509006,
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1699289668,
"platforms": [
"x86_64-darwin",
"i686-darwin",
Expand Down Expand Up @@ -86,28 +85,19 @@
},
{
"package": {
"name": "cacert",
"revision": "ac5c1886fd9fe49748d7ab80accc4c847481df14",
"version": "3.95",
"description": "A bundle of X.509 certificates of public Certificate Authorities (CA)",
"homepage": "https://curl.haxx.se/docs/caextract.html",
"name": "golangci-lint",
"revision": "7445ccd775d8b892fc56448d17345443a05f7fb4",
"version": "1.59.0",
"description": "Fast linters Runner for Go",
"homepage": "https://golangci-lint.run/",
"free": true,
"spdx_id": "MPL-2.0",
"epoch_seconds": 1699289668,
"spdx_id": "GPL-3.0-or-later",
"epoch_seconds": 1716993062,
"platforms": [
"i686-cygwin",
"x86_64-cygwin",
"x86_64-darwin",
"i686-darwin",
"aarch64-darwin",
"armv7a-darwin",
"i686-freebsd13",
"x86_64-freebsd13",
"aarch64-genode",
"i686-genode",
"x86_64-genode",
"x86_64-solaris",
"javascript-ghcjs",
"aarch64-linux",
"armv5tel-linux",
"armv6l-linux",
Expand All @@ -129,61 +119,23 @@
"s390-linux",
"s390x-linux",
"x86_64-linux",
"mmix-mmixware",
"aarch64-netbsd",
"armv6l-netbsd",
"armv7a-netbsd",
"armv7l-netbsd",
"i686-netbsd",
"m68k-netbsd",
"mipsel-netbsd",
"powerpc-netbsd",
"riscv32-netbsd",
"riscv64-netbsd",
"x86_64-netbsd",
"aarch64_be-none",
"aarch64-none",
"arm-none",
"armv6l-none",
"avr-none",
"i686-none",
"microblaze-none",
"microblazeel-none",
"mips-none",
"mips64-none",
"msp430-none",
"or1k-none",
"m68k-none",
"powerpc-none",
"powerpcle-none",
"riscv32-none",
"riscv64-none",
"rx-none",
"s390-none",
"s390x-none",
"vc4-none",
"x86_64-none",
"i686-openbsd",
"x86_64-openbsd",
"x86_64-redox",
"wasm64-wasi",
"wasm32-wasi",
"x86_64-windows",
"i686-windows"
]
"wasm32-wasi"
],
"attr_name": "golangci-lint"
},
"runtime": true
"runtime": false
},
{
"package": {
"name": "gotools",
"revision": "1ebb7d7bba2953a4223956cfb5f068b0095f84a7",
"version": "0.7.0",
"description": "Additional tools for Go development",
"homepage": "https://go.googlesource.com/tools",
"name": "go-task",
"revision": "7445ccd775d8b892fc56448d17345443a05f7fb4",
"version": "3.37.2",
"description": "A task runner / simpler Make alternative written in Go",
"homepage": "https://taskfile.dev/",
"free": true,
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1653393815,
"spdx_id": "MIT",
"epoch_seconds": 1716993062,
"platforms": [
"x86_64-darwin",
"i686-darwin",
Expand All @@ -209,8 +161,11 @@
"riscv64-linux",
"s390-linux",
"s390x-linux",
"x86_64-linux"
]
"x86_64-linux",
"wasm64-wasi",
"wasm32-wasi"
],
"attr_name": "go-task"
},
"runtime": false
},
Expand Down Expand Up @@ -253,6 +208,96 @@
]
},
"runtime": false
},
{
"package": {
"name": "cacert",
"revision": "ac5c1886fd9fe49748d7ab80accc4c847481df14",
"version": "3.95",
"description": "A bundle of X.509 certificates of public Certificate Authorities (CA)",
"homepage": "https://curl.haxx.se/docs/caextract.html",
"free": true,
"spdx_id": "MPL-2.0",
"epoch_seconds": 1699289668,
"platforms": [
"i686-cygwin",
"x86_64-cygwin",
"x86_64-darwin",
"i686-darwin",
"aarch64-darwin",
"armv7a-darwin",
"i686-freebsd13",
"x86_64-freebsd13",
"aarch64-genode",
"i686-genode",
"x86_64-genode",
"x86_64-solaris",
"javascript-ghcjs",
"aarch64-linux",
"armv5tel-linux",
"armv6l-linux",
"armv7a-linux",
"armv7l-linux",
"i686-linux",
"loongarch64-linux",
"m68k-linux",
"microblaze-linux",
"microblazeel-linux",
"mips-linux",
"mips64-linux",
"mips64el-linux",
"mipsel-linux",
"powerpc64-linux",
"powerpc64le-linux",
"riscv32-linux",
"riscv64-linux",
"s390-linux",
"s390x-linux",
"x86_64-linux",
"mmix-mmixware",
"aarch64-netbsd",
"armv6l-netbsd",
"armv7a-netbsd",
"armv7l-netbsd",
"i686-netbsd",
"m68k-netbsd",
"mipsel-netbsd",
"powerpc-netbsd",
"riscv32-netbsd",
"riscv64-netbsd",
"x86_64-netbsd",
"aarch64_be-none",
"aarch64-none",
"arm-none",
"armv6l-none",
"avr-none",
"i686-none",
"microblaze-none",
"microblazeel-none",
"mips-none",
"mips64-none",
"msp430-none",
"or1k-none",
"m68k-none",
"powerpc-none",
"powerpcle-none",
"riscv32-none",
"riscv64-none",
"rx-none",
"s390-none",
"s390x-none",
"vc4-none",
"x86_64-none",
"i686-openbsd",
"x86_64-openbsd",
"x86_64-redox",
"wasm64-wasi",
"wasm32-wasi",
"x86_64-windows",
"i686-windows"
]
},
"runtime": true
}
]
}
29 changes: 6 additions & 23 deletions bsf/flake.lock

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

Loading

0 comments on commit 3b307fb

Please sign in to comment.