Skip to content

Downstream testing for managementportal #7

Downstream testing for managementportal

Downstream testing for managementportal #7

Workflow file for this run

# Continuous integration, including test and integration test
name: Downstream-CI
# Run in master and dev branches and in all pull requests to those branches
on:
workflow_dispatch:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
env:
DOCKER_IMAGE: radarbase/radar-appserver
jobs:
# Build and test the code
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- uses: gradle/gradle-build-action@v2
# Compile the code
- name: Compile code
run: ./gradlew assemble
- name: Setup docker services
run: |
sudo mkdir -p /usr/local/var/lib/radar/appserver/logs/
sudo chown -R $(whoami) /usr/local/var/lib/radar/appserver/logs
docker-compose -f src/integrationTest/resources/docker/docker-compose_downstream.yml up -d postgres managementportal managementportal-postgresql
# Wait for services to start up.
sleep 50
- name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Decrypt google application credentials
run: |
gpg --pinentry-mode loopback --local-user "Yatharth Ranjan" --batch --yes --passphrase "${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}" --output src/integrationTest/resources/google-credentials.json --decrypt src/integrationTest/resources/google-credentials.enc.gpg
# Gradle check
- name: Check
run: GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/src/integrationTest/resources/google-credentials.json ./gradlew check
- name: Upload build artifacts
if: always()
uses: actions/upload-artifact@v3
with:
path: build/reports
if-no-files-found: ignore
retention-days: 5