Add env vars for PubSub handlers #303
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Checks | |
on: | |
pull_request: | |
branches: [ master ] | |
env: | |
# Required for CI workflow | |
JAVA_VERSION: "15" | |
JAVA_DISTRIBUTION: "zulu" | |
# Required for build | |
GCP_SA_KEY_PUBSUB: ${{ secrets.GCP_SA_KEY_PUBSUB }} | |
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }} | |
FIREBASE_AUTH_DOMAIN: ${{ secrets.FIREBASE_AUTH_DOMAIN }} | |
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | |
FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }} | |
FIREBASE_GCM_SENDER_ID: ${{ secrets.FIREBASE_GCM_SENDER_ID }} | |
FIREBASE_APPLICATION_ID: ${{ secrets.FIREBASE_APPLICATION_ID }} | |
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 }} | |
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 }} | |
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 | |
run: | | |
set -o pipefail && | |
bash ./scripts/env.sh && | |
./gradlew --no-daemon assemble | |
- name: Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Build | |
path: | | |
build/bin | |
local.properties | |
local-credentials-pubsub.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' |