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
22root = true
33
4- # default configuration
4+ ; default configuration
55[* ]
66charset = utf-8
77end_of_line = lf
88trim_trailing_whitespace = true
99insert_final_newline = true
10+ indent_style = unset
1011
11- # tab is problematic for markdown
12- [* .md ]
12+ [{* .nix,flake.lock} ]
1313indent_style = space
1414indent_size = 2
1515
16- ; yaml require space indentation
1716[* .{yml,yaml} ]
1817indent_style = space
1918indent_size = 2
2019
21- ; nixpkgs-fmt compatible
22- [* .nix,flake.lock ]
20+ [* .md ]
2321indent_style = space
2422indent_size = 2
2523
26- # gofmt compatible
2724[* .go,go.mod,go.sum ]
2825indent_style = tab
Original file line number Diff line number Diff line change 55 push :
66 branches : [main]
77env :
8- CI_NIX_STORE : ~/nix
98 CI_NIX_FLAKE : .#default
109jobs :
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"
1123 test :
1224 runs-on : ubuntu-latest
1325 steps :
1426 - name : Checkout
15- uses : actions/checkout@v3
27+ uses : actions/checkout@v4
1628 - name : Setup Nix
17- uses : cachix/install- nix-action@v20
29+ uses : DeterminateSystems/ nix-installer- action@main
1830 - 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
2332 - name : Cache Go
24- uses : actions/cache@v3
33+ uses : actions/cache@v4
2534 with :
2635 key : ${{ runner.os }}-go-${{ hashfiles('go.mod', 'go.sum') }}
2736 path : |
2837 ~/.cache/go-build
2938 ~/go/pkg/mod
3039 - name : Test
3140 run : |
32- nix --store ${{ env.CI_NIX_STORE }} \
33- develop ${{ env.CI_NIX_FLAKE }} --command \
41+ nix develop ${{ env.CI_NIX_FLAKE }} --command \
3442 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
27* .exe
38* .exe~
49* .dll
510* .so
611* .dylib
712
8- # go test -c
13+ # Test binary, built with ` go test -c`
914* .test
1015
11- # go test -coverprofile coverage.out
16+ # Output of the go coverage tool, specifically when used with LiteIDE
1217* .out
1318
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
1625
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