-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (88 loc) · 3.11 KB
/
check_gcp.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
88
89
90
91
92
name: PR Checks (GCP)
on:
pull_request:
branches: [ master ]
env:
# Required for CI workflow
JAVA_VERSION: "15"
JAVA_DISTRIBUTION: "zulu"
# Required for build
GCP_SA_KEY_APP: ${{ secrets.GCP_SA_KEY_APP }}
SLACK_SIGNING_SECRET: ${{ secrets.SLACK_SIGNING_SECRET }}
SLACK_REQUEST_VERIFICATION_ENABLED: ${{ secrets.SLACK_REQUEST_VERIFICATION_ENABLED }}
SLACK_CLIENT_ID: ${{ secrets.SLACK_CLIENT_ID }}
SLACK_CLIENT_SECRET: ${{ secrets.SLACK_CLIENT_SECRET }}
SLACK_INTERACTIVITY_PUBSUB_TOPIC: ${{ secrets.SLACK_INTERACTIVITY_PUBSUB_TOPIC }}
SLACK_SLASH_COMMAND_PUBSUB_TOPIC: ${{ secrets.SLACK_SLASH_COMMAND_PUBSUB_TOPIC }}
SLACK_MONITORING_URL: ${{ secrets.SLACK_MONITORING_URL }}
APP_LOG_LEVEL: ${{ secrets.APP_LOG_LEVEL }}
APP_NETWORK_HTML_LOG_LEVEL: ${{ secrets.APP_NETWORK_HTML_LOG_LEVEL }}
APP_NETWORK_JSON_LOG_LEVEL: ${{ secrets.APP_NETWORK_JSON_LOG_LEVEL }}
APP_PUBLIC_URL: ${{ secrets.APP_PUBLIC_URL }}
SEARCH_PRELOAD_PUBSUB_TOPIC: ${{ secrets.SEARCH_PRELOAD_PUBSUB_TOPIC }}
jobs:
jsBuild:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.ref }}_jsBuild
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Set up Gradle cache
uses: gradle/gradle-build-action@v2 # By default, cache is only saved on the 'master' branch
- name: Build project
run: |
set -o pipefail &&
bash ./scripts/env.sh &&
./gradlew --no-daemon assemble
- name: Build container
run: |
set -o pipefail &&
docker build -t check .
- name: Artifacts
uses: actions/upload-artifact@v3
if: always() # Ensure all artifacts are collected, even after errors
with:
name: Build
path: |
build/bin
local.properties
local-credentials-gcp.json
jsTest:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.ref }}_jsTest
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Set up Gradle cache
uses: gradle/gradle-build-action@v2
- name: Test
run: |
set -o pipefail &&
bash ./scripts/env.sh &&
./gradlew --no-daemon --continue jsNodeTest
- name: Generate test report
uses: mikepenz/action-junit-report@v3
if: always() # Ensure all test reports are collected, even after errors
with:
report_paths: '**/build/test-results/**/TEST-*.xml'
check_name: 'jsTestResults'
- name: Artifacts
uses: actions/upload-artifact@v3
if: always() # Ensure all artifacts are collected, even after errors
with:
name: Tests
path: '**/build/test-results/**/TEST-*.xml'