-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 1.34 KB
/
pr.yaml
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
name: PR
on:
workflow_dispatch: {}
pull_request:
branches:
- main
workflow_call:
jobs:
analyze-code:
name: Analyze Code
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Dependencies
uses: ./.github/actions/build-dependencies
- name: Lint
run: |
if test -z "$(gofmt -l .)"; then
echo "Congrats! There is nothing to fix."
else
echo "The following lines should be fixed."
gofmt -s -d .
exit 1
fi
shell: bash
- name: Install revive
run: |
go install github.com/mgechev/revive@e33fb87
sudo cp $HOME/go/bin/revive /usr/bin/
shell: bash
- name: Check Code Style
run: |
make fmt-check
shell: bash
- name: Lint (Revive)
run: |
make lint-check
shell: bash
spycat-unit-tests:
name: spycat Unit Tests
runs-on: ubuntu-22.04
strategy:
matrix:
go-version: [ 1.20 ]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Dependencies
uses: ./.github/actions/build-dependencies
with:
go-version: ${{ matrix.go-version }}
- name: Test Spycat
run: |
sudo make all