From 3fae9ffca29e9decf99c7de2b01088d704e559d1 Mon Sep 17 00:00:00 2001 From: Florian Schlag Date: Sun, 21 Apr 2024 15:31:44 +0200 Subject: [PATCH] migrate from travis to github actions --- .github/workflows/pride-ci.yaml | 29 ++++++++++++++ .travis.yml | 39 ------------------- ...xml => mvnsettings-for-github-actions.xml} | 0 config/postgres.test.config.properties | 2 +- readme.md | 10 ++--- 5 files changed, 35 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/pride-ci.yaml delete mode 100644 .travis.yml rename config/{mvnsettings-for-travis.xml => mvnsettings-for-github-actions.xml} (100%) diff --git a/.github/workflows/pride-ci.yaml b/.github/workflows/pride-ci.yaml new file mode 100644 index 0000000..bc7ee89 --- /dev/null +++ b/.github/workflows/pride-ci.yaml @@ -0,0 +1,29 @@ +name: PriDE CI + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + java: [11, 17] + database: [hsql, sqlite] + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v4 + with: + java-version: '${{ matrix.java }}' + distribution: 'temurin' + cache: maven + - name: Build with Maven with database ${{ matrix.database }} + run: mvn clean test -B -P travis -Duser.name=${{ matrix.database }} --settings config/mvnsettings-for-github-actions.xml + + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@v4 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 804c110..0000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -language: java - -sudo: false -install: true - -jdk: - - oraclejdk9 - -cache: - directories: - - "$HOME/.m2/repository" - -matrix: - include: - - env: DATABASE=hsql - - env: DATABASE=mariadb - addons: - mariadb: "10.3" - before_install: mysqladmin --user=root create test - - env: DATABASE=sqlite - - env: DATABASE=mysql - services: mysql - before_install: mysql -e 'CREATE DATABASE test;' - - env: DATABASE=postgres - addons: - postgresql: "9.6" - services: postgresql - before_install: - - psql -c 'create database test;' -U postgres - - psql test -c 'create extension hstore;' -U postgres - - env: DATABASE=oracle - services: docker - before_install: - - docker run --name oracle -d -p 1521:1521 thebookpeople/oracle-xe-11g - - docker ps -a - - docker exec -i oracle bash -c 'export ORACLE_HOME="/u01/app/oracle/product/11.2.0/xe"; until echo -e "WHENEVER SQLERROR EXIT SQL.SQLCODE \n select 1 from dual;" | /u01/app/oracle/product/11.2.0/xe/bin/sqlplus -s system/oracle@XE > /dev/null; do echo "Waiting for Oracle XE to start...($(date))"; sleep 15; done' - - echo "Give oracle more time to come up..." ; sleep 15 - -script: "mvn clean test -B -P travis -Duser.name=$DATABASE --settings config/mvnsettings-for-travis.xml" diff --git a/config/mvnsettings-for-travis.xml b/config/mvnsettings-for-github-actions.xml similarity index 100% rename from config/mvnsettings-for-travis.xml rename to config/mvnsettings-for-github-actions.xml diff --git a/config/postgres.test.config.properties b/config/postgres.test.config.properties index 112cb45..8c4697e 100644 --- a/config/postgres.test.config.properties +++ b/config/postgres.test.config.properties @@ -2,5 +2,5 @@ pride.dbtype=postgres pride.driver=org.postgresql.Driver pride.db=jdbc:postgresql:test pride.user=postgres -pride.password= +pride.password=postgres pride.logfile=sql.log diff --git a/readme.md b/readme.md index 4f1994e..8fad9f7 100644 --- a/readme.md +++ b/readme.md @@ -14,8 +14,8 @@ See doc/PriDE-History.html for release notes! ## Building PriDE -PriDE is a Maven-based project. The JUnit-Tests can be executed against different types of databases. -At the moment the following types of databases are supported and actively tested on [Travis CI](https://travis-ci.org/j-pride/pride.pm): +PriDE is a Maven-based project. The tests can be executed using different types of databases. +Currently, the following databases are supported: * HSQLDB (Version 2.x) * SQLite (Version 3.x) @@ -31,16 +31,16 @@ To build PriDE _and_ execute all tests, you have to specify a database to run th mvn package -Duser.name=[mysql,hsql,mariadb,oracle,postgres,sqlite,db2] To just build PriDE without execute any tests run -​ + mvn package -DskipTests Afterwards the built jar can be found in `target/pride--SNAPSHOT-.jar` -### Preperations needed for Oracle +### Preparations needed for Oracle If you plan to use an Oracle database, you have to manually install the JDBC driver into your local maven repository. Download the ojdbc8.jar from the [Oracle Technology Network](http://www.oracle.com/technetwork/database/features/jdbc/jdbc-ucp-122-3110062.html). -Afterwards you can install it into your local repository by executing the following command +Afterward you can install it into your local repository by executing the following command mvn install:install-file -DgroupId=com.oracle.jdbc -DartifactId=ojdbc8 -Dversion=12.2.0.1 -Dpackaging=jar -Dfile=ojdbc8.jar -DgeneratePom=true