-
Notifications
You must be signed in to change notification settings - Fork 25
73 lines (65 loc) · 2.08 KB
/
nightly-build.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
name: Nightly Build
on:
schedule:
- cron: '0 10 * * *' # Run every day at 10AM UTC
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Run linting tests
id: update
run: |
make prepare
make lint
make fmt-check
make imports-check
- name: Run unit tests
run: |
make coverage-ci
- name: Build cross-platform binaries
run: |
make build-cli-cross-platform
- name: Run integration tests
env:
CI_ACCOUNT: ${{ secrets.CI_ACCOUNT }}
CI_SUBACCOUNT: ${{ secrets.CI_SUBACCOUNT }}
CI_API_KEY: ${{ secrets.CI_API_KEY }}
CI_API_SECRET: ${{ secrets.CI_API_SECRET }}
LW_INT_TEST_AWS_ACC: ${{ secrets.LW_INT_TEST_AWS_ACC }}
# need vim for integrations test of inline editing LQL queries
run: |
sudo apt-get update
sudo apt-get install -y vim
make integration-only
- name: Notify Slack on Failure
uses: slackapi/slack-github-action@v1.25.0
if: failure()
with:
payload: |
{
"attachments": [
{
"color": "#E92020",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:\n*GitHub Workflow Failure*\ngo-sdk/nightly-build\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}"
}
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK