From e7bb1595e04660ae54f146ebdcd3e1a0f98af07d Mon Sep 17 00:00:00 2001 From: Jeroen Baten Date: Mon, 27 Jun 2022 10:11:29 +0200 Subject: [PATCH] Workflow for Ubuntu 22.04 and Postgresql 14 Created workflow for Ubuntu 22.04 and Postgresql 14 --- .github/workflows/maven-ub22-pg14.yml | 64 +++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/maven-ub22-pg14.yml diff --git a/.github/workflows/maven-ub22-pg14.yml b/.github/workflows/maven-ub22-pg14.yml new file mode 100644 index 000000000..a581d9628 --- /dev/null +++ b/.github/workflows/maven-ub22-pg14.yml @@ -0,0 +1,64 @@ +# 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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Ubuntu 22.04 Java 8 CI with Maven, PostgreSQL 14 and skipTests option + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-22.04 + + services: + postgres: + image: postgres:14.0 + env: + POSTGRES_DB: libreplandev + POSTGRES_PASSWORD: libreplan + POSTGRES_USER: libreplan + ports: + - 5432:5432 + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + steps: + - uses: actions/checkout@v3 + +# - name: Start PostgreSQL on Ubuntu +# run: | +# sudo systemctl start postgresql.service +# pg_isready + +# - name: Set scram password encryption +# run: | +# sudo -u postgres psql --command="ALTER SYSTEM SET password_encryption = 'scram-sha-256';" + +# - name: Create libreplan user +# run: | +# sudo -u postgres psql --command="CREATE USER libreplan PASSWORD 'libreplan'; " +##" --command="\du" + + # - name: Create libreplandev database + # run: | + # sudo -u postgres createdb --owner=libreplan libreplandev + # PGPASSWORD=libreplan psql --username=libreplan --host=localhost --list libreplandev + + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -DskipTests -Ddefault.passwordsControl=false -Ddefault.exampleUsersDisabled=false clean install + +