Skip to content

Update CodeQL

Update CodeQL #21

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: package war file
run: mvn package -DskipTests
working-directory: ./code/SoloSavingsApp
- name: Run Units Tests
run: mvn test
working-directory: ./code/SoloSavingsApp
- name: Start Tomcat container
run: |
docker run -d -p 8080:8080 --name tomcat tomcat:8.5
- name: Copy WAR file to container
run: docker cp target/*.war tomcat:/usr/local/tomcat/webapps
working-directory: ./code/SoloSavingsApp
- name: Wait for app to start
run: |
while ! curl -s http://localhost:8080; do
sleep 1
done
- name: Integration Tests
run: mvn verify -P test
working-directory: ./code/SoloSavingsApp
env:
SPRING_DATASOURCE_URL: jdbc:h2:mem:test
SPRING_JPA_HIBERNATE_DDL_AUTO: create-drop