-
Notifications
You must be signed in to change notification settings - Fork 12
80 lines (78 loc) · 2.44 KB
/
testsOnAction.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
name: MAF tests on action
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
jobs:
build:
name: Run fast tests
runs-on: self-hosted
steps:
# Send a notification to Slack.
- name: Notify push
id: slack
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: maf-logs
status: STARTED
color: warning
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# Check out the GitHub repository.
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Setup Z3
uses: pavpanchekha/[email protected]
with:
version: 4.8.12
distribution: glibc-2.31
# Compile the code.
- name: Compile MAF
run: sbt compile
# Perform the actual tests.
- name: Run the tests
run: sbt "maf/testOnly -- -l IncrementalTest -l SlowTest"
env:
LOG_ENV: ci
LOG_LOCATION: log-${{ github.sha }}
- name: Upload log
uses: actions/upload-artifact@v2
with:
name: Test logging output
path: logs/log-${{ github.sha }}.txt
# If successful, update the Slack notification.
- name: Notify slack success
if: success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
message_id: ${{ steps.slack.outputs.message_id }}
channel: maf-logs
status: SUCCESS
color: good
# If failed, update the Slack notification.
- name: Notify slack fail
if: failure() || cancelled()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
message_id: ${{ steps.slack.outputs.message_id }}
channel: maf-logs
status: FAILED
color: danger
# Send an additional notification upon failure.
#- name: Stress slack fail
# if: failure()
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_BOT_TOKEN }}
# uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# fields: message,commit,author