Skip to content

[Snyk] Security upgrade docker from latest to 24.0.5-dind-alpine3.18 #148

[Snyk] Security upgrade docker from latest to 24.0.5-dind-alpine3.18

[Snyk] Security upgrade docker from latest to 24.0.5-dind-alpine3.18 #148

Workflow file for this run

name: Build and Test
on:
push:
branches: [master, dev]
paths-ignore:
- '**.md'
- '.github/ISSUE_TEMPLATE'
- '.gitignore'
- 'provisioning'
- '.sonarcloud.properties'
- 'LICENSE'
- 'Vagrantfile'
pull_request:
branches: [master, dev]
paths-ignore:
- '**.md'
- '.github/ISSUE_TEMPLATE'
- '.gitignore'
- 'provisioning'
- '.sonarcloud.properties'
- 'LICENSE'
- 'Vagrantfile'
jobs:
lint-java:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.2.0
- uses: axel-op/googlejavaformat-action@fe78db8a90171b6a836449f8d0e982d5d71e5c5a #v3.6.0
with:
args: "--set-exit-if-changed"
build:
needs: lint-java
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.2.0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Build Maven with Docker Profile
run: mvn clean install -Pdocker -DskipTests -B
- name: Docker Compose Build
run: docker-compose build
unit-tests:
needs: [lint-java, build]
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.6
env:
MARIADB_ROOT_PASSWORD: password
MARIADB_DATABASE: core
ports:
- '8888:3306'
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3.2.0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Start MariaDB Server
run: sudo /etc/init.d/mysql start
- name: Modify MyMariaDBSQL Connection Variables
run: |
sed -i "s/'@'localhost'/'@'%'/g" ${GITHUB_WORKSPACE}/src/main/resources/database/moduleSchemas.sql
sed -i 's/TEST_MARIADB_PORT=3306/TEST_MARIADB_PORT=8888/g' ${GITHUB_WORKSPACE}/.env
- name: Run Unit Tests
run: mvn test -B -e -X
integration-tests:
needs: [lint-java, build]
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.6
env:
MARIADB_ROOT_PASSWORD: password
MARIADB_DATABASE: core
ports:
- '8888:3306'
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3.2.0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Start MARIADB Server
run: sudo /etc/init.d/mysql start
- name: Modify MARIADB Connection Variables
run: |
sed -i "s/'@'localhost'/'@'%'/g" ${GITHUB_WORKSPACE}/src/main/resources/database/moduleSchemas.sql
sed -i 's/TEST_MARIADB_PORT=3306/TEST_MARIADB_PORT=8888/g' ${GITHUB_WORKSPACE}/.env
- name: Prepare Integration Tests
run: |
sudo apt-get -y install libargon2-0
mvn -Pdocker validate
- name: Run Intergration Tests
run: |
mvn verify -DskipUTs=true -DmongoDocker -B