Trying to run tests

We know this will currently fail
This commit is contained in:
Jeroen Baten 2022-06-16 21:28:20 +02:00 committed by GitHub
parent eeec0d51c4
commit d234ea649a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

63
.github/workflows/maven-with-test.yml vendored Normal file
View file

@ -0,0 +1,63 @@
# 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 20.04 Java 8 CI with Maven, PostgreSQL 13 and Tests option
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:13.0
env:
POSTGRES_DB: libreplandev , libreplantest
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 -Ddefault.passwordsControl=false -Ddefault.exampleUsersDisabled=false clean install