Skip to content

Commit 44b90e4

Browse files
authored
Merge pull request #1731 from guardian/live/add-riffraff-conf
Add Github action and riffraff configuration for live activities
2 parents 62470a5 + eb3e799 commit 44b90e4

3 files changed

Lines changed: 106 additions & 0 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Live activities
2+
3+
on:
4+
push:
5+
paths:
6+
- cdk/**
7+
- liveactivities/**
8+
- api-models/**
9+
- project/**
10+
- build.sbt
11+
- .github/workflows/liveactivities.yml
12+
workflow_dispatch:
13+
14+
# allow queued workflows to interrupt previous runs
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
17+
cancel-in-progress: true
18+
19+
permissions:
20+
id-token: write
21+
contents: read
22+
checks: write
23+
pull-requests: write
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v6.0.2
30+
31+
- name: Setup JDK and sbt
32+
uses: guardian/setup-scala@v1
33+
34+
- name: Compile, test and assembly
35+
run: sbt "project api-models" "compile" "test" "project liveactivities" "compile" "test" "assembly"
36+
37+
- name: Test Report
38+
uses: dorny/test-reporter@v2
39+
if: success() || failure() # run this step even if previous step failed
40+
with:
41+
name: Tests
42+
path: liveactivities/target/test-reports/TEST-*.xml
43+
reporter: java-junit
44+
only-summary: 'false'
45+
fail-on-error: 'true'
46+
47+
- name: Copy jar to root
48+
run: cp liveactivities/target/scala-*/liveactivities.jar .
49+
50+
- run: corepack enable
51+
52+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 #v6.2.0
53+
with:
54+
cache: yarn
55+
cache-dependency-path: cdk/yarn.lock
56+
node-version-file: .nvmrc
57+
58+
- name: CDK synth
59+
run: |
60+
cd cdk
61+
yarn install --immutable
62+
yarn lint
63+
yarn test
64+
yarn synth
65+
66+
- name: Upload to riff-raff
67+
uses: guardian/actions-riff-raff@v4
68+
with:
69+
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
70+
githubToken: ${{ secrets.GITHUB_TOKEN }}
71+
projectName: mobile-n10n:liveactivities
72+
buildNumberOffset: 4147
73+
configPath: liveactivities/riff-raff.yaml
74+
75+
contentDirectories: |
76+
liveactivities:
77+
- liveactivities.jar
78+
mobile-notifications-liveactivities-cfn:
79+
- cdk/cdk.out/LiveActivities-CODE.template.json

liveactivities/riff-raff.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
stacks: [mobile-notifications]
2+
regions: [eu-west-1]
3+
4+
deployments:
5+
mobile-notifications-liveactivities-cfn:
6+
type: cloud-formation
7+
app: liveactivities
8+
parameters:
9+
templateStagePaths:
10+
CODE: LiveActivities-CODE.template.json
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.gu.liveactivities
2+
3+
import java.net.URI
4+
import java.time.ZonedDateTime
5+
import org.specs2.mutable.Specification
6+
import org.specs2.specification.Scope
7+
import pa.{Competition, MatchDay, MatchDayTeam, Round, Stage, Venue}
8+
9+
class LiveActivitiesSpec extends Specification {
10+
11+
"A LiveActivities" should {
12+
13+
"create a channel" in {
14+
1 must beEqualTo(1)
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)