-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (77 loc) · 2.72 KB
/
gnm-style.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
83
84
85
86
87
name: Build and upload
on:
push:
branches: ["**"]
workflow_dispatch: {}
jobs:
concierge-graphql-gnm:
runs-on: ubuntu-latest
# The first two permissions are needed to interact with GitHub's OIDC Token endpoint.
# The second set of three permissions are needed to write test results back to GH
permissions:
id-token: write
contents: read
issues: read
checks: write
pull-requests: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'yarn'
cache-dependency-path: cdk/yarn.lock
# - run: yarn install --frozen-lockfile
# name: Prepare to build explorer
# working-directory: explorer
#
# - run: yarn build
# name: Build explorer
# working-directory: explorer
- run: yarn install --frozen-lockfile
name: Prepare for CDK infrastructure build
working-directory: cdk
- run: yarn test
name: Test CDK infrastructure integrity
working-directory: cdk
- run: yarn synth
name: Build infrastructure definition from CDK
working-directory: cdk
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 11
cache: sbt
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-region: eu-west-1
# role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
# role-session-name: content-api-concierge-graphql-build
- name: Build and test
env:
SBT_JUNIT_OUTPUT: ./junit-tests
JAVA_OPTS: -Dsbt.log.noformat=true
run: |
sbt 'test;debian:packageBin'
- uses: guardian/actions-riff-raff@v4
with:
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
configPath: ./riff-raff.yaml
projectName: Content Platforms::concierge-graphql-experimental
contentDirectories: |
concierge-graphql:
- target/concierge-graphql_0.1.0_all.deb
cloudformation:
- cdk/cdk.out/ConciergeGraphql-PROD-AARDVARK.template.json
- cdk/cdk.out/ConciergeGraphql-CODE-AARDVARK.template.json
cloudformation-preview:
- cdk/cdk.out/ConciergeGraphql-preview-PROD-AARDVARK.template.json
- cdk/cdk.out/ConciergeGraphql-preview-CODE-AARDVARK.template.json
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always() #runs even if there is a test failure
with:
files: junit-tests/*.xml