-
Notifications
You must be signed in to change notification settings - Fork 42
69 lines (52 loc) · 1.41 KB
/
lint.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
name: Lint and check code for errors
on:
push:
branches:
- rewrite
paths:
- "Payload_Type/thanatos/**"
- ".github/workflows/**"
env:
AGENT_CODE: Payload_Type/thanatos/agent
MYTHIC_CODE: Payload_Type/thanatos/mythic
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-agent:
name: Lint Agent Code
runs-on: ubuntu-latest
env:
JSON_CONFIG: testing/configs/config.json
defaults:
run:
working-directory: ${{ env.AGENT_CODE }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/workflows/dependencies
- name: Lint agent code
run: make lint
- name: Check agent code formatting
run: make checkformat
lint-mythic:
name: Lint Mythic Code
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.MYTHIC_CODE }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/workflows/dependencies
- name: Build protobuf files
run: make protobuf
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: ${{ env.MYTHIC_CODE }}
- name: Check Mythic code formatting
run: make checkformat