-
Notifications
You must be signed in to change notification settings - Fork 4
82 lines (70 loc) · 2.21 KB
/
slo-monitor.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
81
82
name: SLO monitor
on:
push:
paths:
- slomonitor/**
- commoneventconsumer/**
- cdk/**
- project/**
- build.sbt
- .github/workflows/slo-monitor.yml
workflow_dispatch:
# allow queued workflows to interrupt previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
checks: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup JDK and sbt
uses: guardian/setup-scala@v1
- uses: actions/setup-node@v3
with:
cache: npm
cache-dependency-path: cdk/package-lock.json
node-version-file: .nvmrc
- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: eu-west-1
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
- name: Compile, test and assembly
run: sbt "project commoneventconsumer" "compile" "test" "project slomonitor" "compile" "test" "assembly"
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: Tests
path: slomonitor/target/test-reports/TEST-*.xml
reporter: java-junit
only-summary: 'false'
fail-on-error: 'true'
- name: Copy jar to root
run: cp slomonitor/target/scala-*/slomonitor.jar .
- name: CDK synth
run: |
cd cdk
npm install
npm run lint
npm test
npm run synth
- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v4
with:
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: mobile-n10n:slomonitor
buildNumberOffset: 4147
configPath: slomonitor/riff-raff.yaml
contentDirectories: |
slomonitor:
- slomonitor.jar
mobile-notifications-slo-monitor-cfn:
- cdk/cdk.out/SloMonitor-CODE.template.json
- cdk/cdk.out/SloMonitor-PROD.template.json