Skip to content

Commit 9f66bd8

Browse files
update github handle
1 parent d7cbdf0 commit 9f66bd8

File tree

23 files changed

+68
-65
lines changed

23 files changed

+68
-65
lines changed

.editorconfig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ trim_trailing_whitespace = true
99
insert_final_newline = true
1010
indent_style = unset
1111

12-
[*.nix,flake.lock]
12+
[{*.nix,flake.lock}]
1313
indent_style = space
1414
indent_size = 2
1515

16-
[*.md]
16+
[*.{yml,yaml}]
1717
indent_style = space
1818
indent_size = 2
1919

20-
[*.go,go.mod,go.sum]
21-
indent_style = tab
20+
[*.md]
21+
indent_style = space
22+
indent_size = 2

.github/workflows/main.yaml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,38 @@ on:
55
push:
66
branches: [main]
77
env:
8-
CI_NIX_STORE: ~/nix
98
CI_NIX_FLAKE: .#default
109
jobs:
1110
lint:
1211
runs-on: ubuntu-latest
1312
steps:
1413
- name: Checkout
15-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1615
- name: Setup Nix
17-
uses: cachix/install-nix-action@v20
16+
uses: DeterminateSystems/nix-installer-action@main
1817
- name: Cache Nix
19-
uses: actions/cache@v3
20-
with:
21-
path: ${{ env.CI_NIX_STORE }}
22-
key: ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }}
18+
uses: DeterminateSystems/magic-nix-cache-action@main
2319
- name: Lint
2420
run: |
25-
nix --store ${{ env.CI_NIX_STORE }} \
26-
develop ${{ env.CI_NIX_FLAKE }} --command \
21+
nix develop ${{ env.CI_NIX_FLAKE }} --command \
2722
editorconfig-checker && echo "ok"
28-
2923
test:
3024
runs-on: ubuntu-latest
3125
steps:
3226
- name: Checkout
33-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
3428
- name: Setup Nix
35-
uses: cachix/install-nix-action@v20
29+
uses: DeterminateSystems/nix-installer-action@main
3630
- name: Cache Nix
37-
uses: actions/cache@v3
38-
with:
39-
path: ${{ env.CI_NIX_STORE }}
40-
key: ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }}
31+
uses: DeterminateSystems/magic-nix-cache-action@main
4132
- name: Cache Go
42-
uses: actions/cache@v3
33+
uses: actions/cache@v4
4334
with:
4435
key: ${{ runner.os }}-go-${{ hashfiles('go.mod', 'go.sum') }}
4536
path: |
4637
~/.cache/go-build
4738
~/go/pkg/mod
4839
- name: Test
4940
run: |
50-
nix --store ${{ env.CI_NIX_STORE }} \
51-
develop ${{ env.CI_NIX_FLAKE }} --command \
52-
go test -v -short -cover -race ./...
41+
nix develop ${{ env.CI_NIX_FLAKE }} --command \
42+
go test -v -cover -race ./...

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
nixpkgs/update:
2+
@nix flake lock --override-input nixpkgs github:NixOS/nixpkgs/$(rev)
3+
4+
.PHONY: build test run clean
5+
6+
test:
7+
@go test -cover ./...

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,30 @@
33

44
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
55

6-
outputs = { self, nixpkgs }:
6+
outputs =
7+
{ nixpkgs, ... }:
78
let
89
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
910
in
1011
{
11-
devShells = forAllSystems (system:
12+
devShells = forAllSystems (
13+
system:
1214
let
1315
pkgs = nixpkgs.legacyPackages.${system};
1416
in
1517
{
1618
default = pkgs.mkShell {
1719
name = "minmax";
1820
shellHook = ''
21+
git rev-parse --is-inside-work-tree >/dev/null 2>&1 || git init
1922
git config pull.rebase true
20-
${pkgs.neo-cowsay}/bin/cowsay -f sage -n "Daily dose of Data Structure & Algorithm"
23+
${pkgs.neo-cowsay}/bin/cowsay -f sage "Daily dose of Data Structure & Algorithm"
2124
'';
2225
buildInputs = with pkgs; [
2326
editorconfig-checker
2427
go
28+
gopls
29+
delve
2530
];
2631
};
2732
}

geeksforgeeks/auto-complete-feature/solution_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package auto_complete_feature_test
33
import (
44
"testing"
55

6-
sut "github.com/minizilla/minmax/geeksforgeeks/auto-complete-feature"
7-
"github.com/minizilla/testr"
6+
sut "github.com/smoothprogrammer/minmax/geeksforgeeks/auto-complete-feature"
7+
"github.com/smoothprogrammer/testr"
88
)
99

1010
func TestAutoCompleteFeature(t *testing.T) {

geeksforgeeks/chocolate-distribution-problem/solution_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package chocolate_distribution_problem_test
33
import (
44
"testing"
55

6-
sut "github.com/minizilla/minmax/geeksforgeeks/chocolate-distribution-problem"
7-
"github.com/minizilla/testr"
6+
sut "github.com/smoothprogrammer/minmax/geeksforgeeks/chocolate-distribution-problem"
7+
"github.com/smoothprogrammer/testr"
88
)
99

1010
func TestChocolateDistributionProblem(t *testing.T) {

geeksforgeeks/conway-game-of-life/solution_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package conway_game_of_life_test
33
import (
44
"testing"
55

6-
sut "github.com/minizilla/minmax/geeksforgeeks/conway-game-of-life"
7-
"github.com/minizilla/testr"
6+
sut "github.com/smoothprogrammer/minmax/geeksforgeeks/conway-game-of-life"
7+
"github.com/smoothprogrammer/testr"
88
)
99

1010
func TestConwayGameOfLife(t *testing.T) {

geeksforgeeks/fibonacci/solution_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"strconv"
55
"testing"
66

7-
"github.com/minizilla/minmax/geeksforgeeks/fibonacci"
8-
"github.com/minizilla/testr"
7+
"github.com/smoothprogrammer/minmax/geeksforgeeks/fibonacci"
8+
"github.com/smoothprogrammer/testr"
99
)
1010

1111
func TestFibonacci(t *testing.T) {

geeksforgeeks/find-the-number-of-islands/solution_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package find_the_number_of_islands_test
33
import (
44
"testing"
55

6-
sut "github.com/minizilla/minmax/geeksforgeeks/find-the-number-of-islands"
7-
"github.com/minizilla/testr"
6+
sut "github.com/smoothprogrammer/minmax/geeksforgeeks/find-the-number-of-islands"
7+
"github.com/smoothprogrammer/testr"
88
)
99

1010
func TestFindTheNumberOfIslands(t *testing.T) {

0 commit comments

Comments
 (0)