Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task ci #3

Merged
merged 5 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Taskfile Ci

on:
push:
branches:
- main
- task-ci

jobs:
test_all:
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check Nixpkgs inputs
uses: DeterminateSystems/flake-checker-action@main
with:
fail-mode: true
flake-lock-path: ./bsf/flake.lock
- uses: nicknovitski/nix-develop@v1
with:
arguments: bsf/.#devShell
- name: run tests
run: task test
7 changes: 7 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3'

tasks:
test:
desc: "Run all Go tests"
cmds:
- go test ./...
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].0", "go-task@~3.37.2"]
runtime = ["[email protected]"]
}

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

120 changes: 61 additions & 59 deletions bsf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"packages": [
{
"package": {
"name": "go",
"revision": "5a7b241264578c55cd25aa7422121aef072ce588",
"name": "delve",
"revision": "a731d0cb71c58f56895f71a5b02eda2962a46746",
"version": "1.22.0",
"description": "The Go Programming language",
"homepage": "https://go.dev/",
"description": "debugger for the Go programming language",
"homepage": "https://github.com/go-delve/delve",
"free": true,
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1707509006,
"spdx_id": "MIT",
"epoch_seconds": 1705066566,
"platforms": [
"x86_64-darwin",
"i686-darwin",
Expand All @@ -39,21 +39,63 @@
"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": "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": "MIT",
"epoch_seconds": 1707509006,
"epoch_seconds": 1716993062,
"platforms": [
"x86_64-darwin",
"i686-darwin",
"aarch64-darwin",
"armv7a-darwin",
"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",
"wasm64-wasi",
"wasm32-wasi"
],
"attr_name": "go-task"
},
"runtime": false
},
{
"package": {
"name": "gotools",
"revision": "ac5c1886fd9fe49748d7ab80accc4c847481df14",
"version": "0.16.1",
"description": "Additional tools for Go development",
"homepage": "https://go.googlesource.com/tools",
"free": true,
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1699289668,
"platforms": [
"x86_64-darwin",
"i686-darwin",
Expand Down Expand Up @@ -176,53 +218,13 @@
},
{
"package": {
"name": "gotools",
"revision": "1ebb7d7bba2953a4223956cfb5f068b0095f84a7",
"version": "0.7.0",
"description": "Additional tools for Go development",
"homepage": "https://go.googlesource.com/tools",
"free": true,
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1653393815,
"platforms": [
"x86_64-darwin",
"i686-darwin",
"aarch64-darwin",
"armv7a-darwin",
"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"
]
},
"runtime": false
},
{
"package": {
"name": "delve",
"name": "go",
"revision": "a731d0cb71c58f56895f71a5b02eda2962a46746",
"version": "1.22.0",
"description": "debugger for the Go programming language",
"homepage": "https://github.com/go-delve/delve",
"version": "1.21.6",
"description": "The Go Programming language",
"homepage": "https://go.dev/",
"free": true,
"spdx_id": "MIT",
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1705066566,
"platforms": [
"x86_64-darwin",
Expand Down
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.

41 changes: 18 additions & 23 deletions bsf/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
description = "";

inputs = {
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746.url = "github:nixos/nixpkgs/a731d0cb71c58f56895f71a5b02eda2962a46746";
nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588.url = "github:nixos/nixpkgs/5a7b241264578c55cd25aa7422121aef072ce588";
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14.url = "github:nixos/nixpkgs/ac5c1886fd9fe49748d7ab80accc4c847481df14";
nixpkgs-1ebb7d7bba2953a4223956cfb5f068b0095f84a7.url = "github:nixos/nixpkgs/1ebb7d7bba2953a4223956cfb5f068b0095f84a7";
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746.url = "github:nixos/nixpkgs/a731d0cb71c58f56895f71a5b02eda2962a46746";
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4.url = "github:nixos/nixpkgs/7445ccd775d8b892fc56448d17345443a05f7fb4";

nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
gomod2nix.url = "github:nix-community/gomod2nix";
Expand All @@ -27,21 +26,19 @@



nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746,
nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588,
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14,
nixpkgs-1ebb7d7bba2953a4223956cfb5f068b0095f84a7,
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746,
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4,
}: let
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ];


forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
inherit system;

nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs = import nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746 { inherit system; };
nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588-pkgs = import nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588 { inherit system; };
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs = import nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14 { inherit system; };
nixpkgs-1ebb7d7bba2953a4223956cfb5f068b0095f84a7-pkgs = import nixpkgs-1ebb7d7bba2953a4223956cfb5f068b0095f84a7 { inherit system; };
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs = import nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746 { inherit system; };
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs = import nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4 { inherit system; };

buildGoApplication = gomod2nix.legacyPackages.${system}.buildGoApplication;
pkgs = import nixpkgs { inherit system; };
Expand All @@ -53,10 +50,9 @@
buildGoApplication,


nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs,
nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588-pkgs,
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs,
nixpkgs-1ebb7d7bba2953a4223956cfb5f068b0095f84a7-pkgs,
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs,
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs,
... }: {
default = pkgs.callPackage ./default.nix {
inherit buildGoApplication;
Expand All @@ -72,18 +68,17 @@



nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs,
nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588-pkgs,
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs,
nixpkgs-1ebb7d7bba2953a4223956cfb5f068b0095f84a7-pkgs,
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs,
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs,
... }: {
devShell = pkgs.mkShell {
# The Nix packages provided in the environment
packages = [
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.delve
nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588-pkgs.go_1_22
nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588-pkgs.goreleaser
nixpkgs-1ebb7d7bba2953a4223956cfb5f068b0095f84a7-pkgs.gotools
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.go
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs.go-task
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs.gotools

];
};
Expand All @@ -94,7 +89,7 @@



nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs, nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588-pkgs, nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs, nixpkgs-1ebb7d7bba2953a4223956cfb5f068b0095f84a7-pkgs, ... }: {
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs, nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs, nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs, ... }: {
runtime = pkgs.buildEnv {
name = "runtimeenv";
paths = [
Expand All @@ -109,14 +104,14 @@



nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs, nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588-pkgs, nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs, nixpkgs-1ebb7d7bba2953a4223956cfb5f068b0095f84a7-pkgs, ... }: {
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs, nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs, nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs, ... }: {
development = pkgs.buildEnv {
name = "devenv";
paths = [
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.delve
nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588-pkgs.go_1_22
nixpkgs-5a7b241264578c55cd25aa7422121aef072ce588-pkgs.goreleaser
nixpkgs-1ebb7d7bba2953a4223956cfb5f068b0095f84a7-pkgs.gotools
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.go
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs.go-task
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs.gotools

];
};
Expand Down
Loading
Loading