Skip to content

Commit 3f7fbe8

Browse files
author
iru
authored
ci: scheduled regresion tests on sysdig backend (#232)
1 parent d7725e1 commit 3f7fbe8

File tree

2 files changed

+72
-4
lines changed

2 files changed

+72
-4
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Scheduled Backend - Regresion Test
2+
3+
on:
4+
schedule:
5+
- cron: "0 11 * * *"
6+
7+
env:
8+
GO_VERSION: "^1.19" # any 1.x version, see go.mod file for minimum
9+
10+
jobs:
11+
test:
12+
name: Test
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v3
21+
with:
22+
go-version: ${{ env.GO_VERSION }}
23+
check-latest: true
24+
cache: true
25+
26+
- name: Get dependencies
27+
run: |
28+
go install github.com/onsi/ginkgo/v2/ginkgo@latest
29+
go mod tidy
30+
31+
- name: Test
32+
run: make test
33+
34+
- name: Acceptance tests
35+
run: make testacc
36+
env:
37+
SYSDIG_MONITOR_API_TOKEN: ${{ secrets.KUBELAB_MONITOR_API_TOKEN }}
38+
SYSDIG_SECURE_API_TOKEN: ${{ secrets.KUBELAB_SECURE_API_TOKEN }}
39+
40+
slackNotification:
41+
if: failure()
42+
name: Slack Notification
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v2
46+
- name: Slack Notification
47+
uses: rtCamp/action-slack-notify@v2
48+
env:
49+
SLACK_CHANNEL: ws-cloudnative-alerts
50+
SLACK_ICON: https://github.com/fluidicon.png
51+
SLACK_MESSAGE: 'Terraform Provider'
52+
SLACK_TITLE: Regression Test Failed
53+
SLACK_USERNAME: terraform-provider-sysdig
54+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
55+
MSG_MINIMAL: true
56+
- uses: 8398a7/action-slack@v3
57+
with:
58+
status: ${{ job.status }}
59+
fields: repo,message,action,workflow,job,took
60+
env:
61+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

.github/workflows/issues-slack-notify.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ jobs:
1111
- name: Slack Notification
1212
uses: rtCamp/action-slack-notify@v2
1313
env:
14-
SLACK_CHANNEL: ws-cloudnative-internal
14+
SLACK_CHANNEL: ws-cloudnative-alerts
1515
SLACK_ICON: https://github.com/fluidicon.png
16-
SLACK_MESSAGE: 'An issue has been opened in Terraform Sysdig Provider repository'
17-
SLACK_TITLE: Issue Created
18-
SLACK_USERNAME: gitHub
16+
SLACK_MESSAGE: 'Terraform Provider'
17+
SLACK_TITLE: A new issue was created
18+
SLACK_USERNAME: terraform-provider-sysdig
1919
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
20+
MSG_MINIMAL: true
21+
- uses: 8398a7/action-slack@v3
22+
with:
23+
status: ${{ job.status }}
24+
fields: message,author,ref
25+
env:
26+
SLACK_WEBHOOK_URL: {{ secrets.SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)