forked from hirochachacha/go-smb2
-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (58 loc) · 1.69 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
on: [push, pull_request]
jobs:
test_linux:
strategy:
matrix:
go: [1.11, 1.17]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
- run: |
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@v2
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 ./...
test_windows:
strategy:
matrix:
go: [1.11, 1.17]
runs-on: windows-latest
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@v2
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 ./...