-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (79 loc) · 2.14 KB
/
ci.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
recursivefs:
name: recursivefs
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Setup go 1.18
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Checkout code
uses: actions/checkout@v3
- name: Download dependencies
run: go mod download
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
args: --verbose --config .github/.golangci.yml --enable gofmt --enable goimports
if: matrix.os != 'windows-latest'
- name: Lint Windows
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
args: --verbose --config .github/.golangci.yml
if: matrix.os == 'windows-latest'
- name: Test
run: go test -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic .
shell: bash
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: matrix.os == 'windows-latest'
fs:
name: fs
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Setup go 1.18
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Checkout code
uses: actions/checkout@v3
- name: Download dependencies
run: go mod download
- name: Setup node
uses: actions/setup-node@v3
with: {node-version: '10.x'}
- name: Install bats
run: npm install -g bats@1.1.0
- name: Build
run: |
go build .
go install .
mkdir bin
mv fs* bin
working-directory: ./cmd/fs
shell: bash
- name: Bats test
run: bats testdata/fs.bats
shell: bash
- name: Upload
uses: actions/upload-artifact@master
with:
name: fs ${{ matrix.os }}
path: cmd/fs/bin