File tree Expand file tree Collapse file tree 4 files changed +46
-42
lines changed Expand file tree Collapse file tree 4 files changed +46
-42
lines changed Original file line number Diff line number Diff line change 1
- # https://editorconfig.org
1
+ ; https://editorconfig.org
2
2
root = true
3
3
4
- # default configuration
4
+ ; default configuration
5
5
[* ]
6
6
charset = utf-8
7
7
end_of_line = lf
8
8
trim_trailing_whitespace = true
9
9
insert_final_newline = true
10
+ indent_style = unset
10
11
11
- # tab is problematic for markdown
12
- [* .md ]
12
+ [{* .nix,flake.lock} ]
13
13
indent_style = space
14
14
indent_size = 2
15
15
16
- ; yaml require space indentation
17
16
[* .{yml,yaml} ]
18
17
indent_style = space
19
18
indent_size = 2
20
19
21
- ; nixpkgs-fmt compatible
22
- [* .nix,flake.lock ]
20
+ [* .md ]
23
21
indent_style = space
24
22
indent_size = 2
25
23
26
- # gofmt compatible
27
24
[* .go,go.mod,go.sum ]
28
25
indent_style = tab
Original file line number Diff line number Diff line change 5
5
push :
6
6
branches : [main]
7
7
env :
8
- CI_NIX_STORE : ~/nix
9
8
CI_NIX_FLAKE : .#default
10
9
jobs :
10
+ lint :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout
14
+ uses : actions/checkout@v4
15
+ - name : Setup Nix
16
+ uses : DeterminateSystems/nix-installer-action@main
17
+ - name : Cache Nix
18
+ uses : DeterminateSystems/magic-nix-cache-action@main
19
+ - name : Lint
20
+ run : |
21
+ nix develop ${{ env.CI_NIX_FLAKE }} --command \
22
+ editorconfig-checker && echo "ok"
11
23
test :
12
24
runs-on : ubuntu-latest
13
25
steps :
14
26
- name : Checkout
15
- uses : actions/checkout@v3
27
+ uses : actions/checkout@v4
16
28
- name : Setup Nix
17
- uses : cachix/install- nix-action@v20
29
+ uses : DeterminateSystems/ nix-installer- action@main
18
30
- 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') }}
31
+ uses : DeterminateSystems/magic-nix-cache-action@main
23
32
- name : Cache Go
24
- uses : actions/cache@v3
33
+ uses : actions/cache@v4
25
34
with :
26
35
key : ${{ runner.os }}-go-${{ hashfiles('go.mod', 'go.sum') }}
27
36
path : |
28
37
~/.cache/go-build
29
38
~/go/pkg/mod
30
39
- name : Test
31
40
run : |
32
- nix --store ${{ env.CI_NIX_STORE }} \
33
- develop ${{ env.CI_NIX_FLAKE }} --command \
41
+ nix develop ${{ env.CI_NIX_FLAKE }} --command \
34
42
go test -v -cover -race ./...
35
- lint :
36
- runs-on : ubuntu-latest
37
- steps :
38
- - name : Checkout
39
- uses : actions/checkout@v3
40
- - name : Setup Nix
41
- uses : cachix/install-nix-action@v20
42
- - name : Cache Nix
43
- uses : actions/cache@v3
44
- with :
45
- path : ${{ env.CI_NIX_STORE }}
46
- key : ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }}
47
- - name : Lint
48
- run : |
49
- nix --store ${{ env.CI_NIX_STORE }} \
50
- develop ${{ env.CI_NIX_FLAKE }} --command \
51
- editorconfig-checker && echo "ok"
Original file line number Diff line number Diff line change 1
- # binaries for programs and plugins
1
+ # https://github.com/github/gitignore/blob/main/Go.gitignore
2
+
3
+ # If you prefer the allow list template instead of the deny list, see community template:
4
+ # https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
5
+ #
6
+ # Binaries for programs and plugins
2
7
* .exe
3
8
* .exe~
4
9
* .dll
5
10
* .so
6
11
* .dylib
7
12
8
- # go test -c
13
+ # Test binary, built with ` go test -c`
9
14
* .test
10
15
11
- # go test -coverprofile coverage.out
16
+ # Output of the go coverage tool, specifically when used with LiteIDE
12
17
* .out
13
18
14
- # direnv cache folder
15
- .direnv /
19
+ # Dependency directories (remove the comment below to include it)
20
+ # vendor/
21
+
22
+ # Go workspace file
23
+ go.work
24
+ go.work.sum
16
25
17
- # macOS
18
- .DS_Store
26
+ # env file
27
+ .env
Original file line number Diff line number Diff line change
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 ./...
You can’t perform that action at this time.
0 commit comments