This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
forked from stuartcryan/lastpass-alfred-workflow
-
Notifications
You must be signed in to change notification settings - Fork 31
98 lines (80 loc) · 2.49 KB
/
main.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
87
88
89
90
91
92
93
94
95
96
97
98
name: Build and Test
on:
push:
branches: ['**']
paths:
- '**'
- '!.gitignore'
- '!LICENSE'
- '!*.md'
jobs:
lint:
name: lint
runs-on: ubuntu-20.04
steps:
# Not needed since it's a public repo
# - name: Granting private modules access
# run: |
# git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:[email protected]/blacs30".insteadOf "https://github.com/blacs30"
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ~1.18
- name: Check out code
uses: actions/checkout@v3
- name: Install golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.47.2
- name: Run vet.
run: make vet
- name: Run lint.
run: make lint
test:
name: test
runs-on: ubuntu-20.04
steps:
# Not needed since it's a public repo
# - name: Granting private modules access
# run: |
# git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:[email protected]/blacs30".insteadOf "https://github.com/blacs30"
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ~1.18
- name: Check out code
uses: actions/checkout@v3
- name: Run test.
run: make test
- name: Run Unit tests.
run: make test-coverage
# Disable for now, failing again
#- name: Upload Coverage report to CodeCov
# uses: codecov/codecov-action@v1
# with:
# token: ${{secrets.CODECOV_TOKEN}}
# file: ./coverage.txt
# flags: unittests
# fail_ci_if_error: true
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: [lint, test]
strategy:
matrix:
os: [macos-11, macos-12, macos-13, ubuntu-20.04]
steps:
# Not needed since it's a public repo
# - name: Granting private modules access
# run: |
# git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:[email protected]/blacs30".insteadOf "https://github.com/blacs30"
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ~1.18
- name: Check out code
uses: actions/checkout@v3
- name: Build
run: make build
- name: Create universal binary
if: ${{ matrix.os != 'ubuntu-20.04' }}
run: |
make universal-binary