Skip to content

Added external integration tests #161

Added external integration tests

Added external integration tests #161

Workflow file for this run

# This workflow will build a Java project with Maven
name: Java CI with Maven
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCS_CREDENTIALS }}
- name: Set up Google Cloud credentials
run: echo "${{ secrets.GCS_CREDENTIALS }}" > "$HOME/gcp-key.json"
- name: Debug Google Cloud Credentials
run: cat $HOME/gcp-key.json
env:
GOOGLE_APPLICATION_CREDENTIALS: $HOME/gcp-key.json
- name: Test GCS Authentication
run: |
gcloud auth activate-service-account --key-file=$HOME/gcp-key.json
gsutil ls gs://innov8-livesched-bucket
env:
GOOGLE_APPLICATION_CREDENTIALS: $HOME/gcp-key.json
- name: Build and Test with Maven
run: mvn -B clean test --file LiveSched/pom.xml
env:
GOOGLE_APPLICATION_CREDENTIALS: $HOME/gcp-key.json
- name: Checkstyle Analysis
run: |
mvn checkstyle:checkstyle --file LiveSched/pom.xml
mkdir -p reports/checkstyle
cp -r LiveSched/target/site/* reports/checkstyle/
continue-on-error: true
- name: PMD Static Analysis
run: |
mvn pmd:check --file LiveSched/pom.xml
mkdir -p reports/pmd
cp -r LiveSched/target/reports/* reports/pmd/
continue-on-error: true
- name: JaCoCo Branch Coverage
run: |
mvn jacoco:report --file LiveSched/pom.xml
mkdir -p reports/jacoco
cp -r LiveSched/target/site/jacoco/* reports/jacoco/
continue-on-error: true
- name: Upload Reports
uses: actions/upload-artifact@v3
with:
name: ci-reports
path: reports/