-
Notifications
You must be signed in to change notification settings - Fork 5
70 lines (69 loc) · 1.98 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
on: [pull_request, workflow_dispatch]
jobs:
test_linux:
strategy:
matrix:
go: [1.20.2]
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
- run: |
sudo apt update
sudo apt install -y samba
sudo groupadd smbgroup
sudo useradd smbuser -G smbgroup
(echo Smbpasswd12345; echo Smbpasswd12345) | sudo smbpasswd -a -s smbuser
sudo cp ./.github/smb.conf /etc/samba/smb.conf
sudo smbd
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-${{ matrix.go }}-
- run: |
cp ./.github/client_conf.json ./
go test -v -race ./...
- uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
skip-cache: true
args: --timeout=8m
test_windows:
strategy:
matrix:
go: [1.20.2]
runs-on: windows-2022
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
- run: |
mkdir C:\tmp
net user smbuser Smbpasswd12345 /add
net share tmp="C:\tmp" /GRANT:smbuser,full
net share tmp2="C:\tmp" /GRANT:smbuser,read
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-${{ matrix.go }}-
- run: |
cp ./.github/client_conf.json ./
go test -v -race ./...
- uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
skip-cache: true
args: --timeout=8m