Fix permissions and typo

This commit is contained in:
Christian Beikov 2020-11-26 16:19:08 +01:00
parent 234bfab1ac
commit 36d9ec4040
5 changed files with 40 additions and 32 deletions

View File

@ -4,7 +4,7 @@
# See https://docs.github.com/en/free-pro-team@latest/actions # See https://docs.github.com/en/free-pro-team@latest/actions
# for more information about GitHub actions. # for more information about GitHub actions.
name: Hibernate ORM contributor build name: Hibernate ORM build
on: on:
push: push:
@ -17,25 +17,30 @@ on:
- 'wip/6.0' - 'wip/6.0'
jobs: jobs:
build: build:
name: Build and test on Java 8 against a wide range of DBs name: Java 8
runs-on: ubuntu-latest runs-on: ubuntu-latest
# We want to know the test results of all matrix entries
continue-on-error: true
strategy: strategy:
fail-fast: false
matrix: matrix:
# When GitHub Actions supports it: https://github.com/actions/toolkit/issues/399
# We will use the experimental flag as indicator whether a failure should cause a workflow failure
include: include:
- rdbms: h2 - rdbms: h2
jdk: 8 experimental: false
- rdbms: derby - rdbms: derby
jdk: 8 experimental: true
- rdbms: mariadb - rdbms: mariadb
jdk: 8 experimental: true
- rdbms: postgresql - rdbms: postgresql
jdk: 8 experimental: true
- rdbms: oracle - rdbms: oracle
jdk: 8 experimental: true
- rdbms: db2 - rdbms: db2
jdk: 8 experimental: true
- rdbms: mssql - rdbms: mssql
jdk: 8 experimental: true
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Java 8 - name: Set up Java 8
@ -60,20 +65,21 @@ jobs:
- name: Run build script - name: Run build script
env: env:
RDBMS: ${{ matrix.rdbms }} RDBMS: ${{ matrix.rdbms }}
JDK: ${{ matrix.jdk }} run: ./ci/build-github.sh
run: ./ci/build-guthub.sh
shell: bash shell: bash
- name: Upload test reports (if Gradle failed) - name: Upload test reports (if Gradle failed)
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
if: failure() if: failure()
with: with:
name: test-reports-java8 name: test-reports-java8-${{ matrix.rdbms }}
path: './**/target/reports/tests/test/' path: './**/target/reports/tests/test/'
- name: Omit produced artifacts from build cache - name: Omit produced artifacts from build cache
run: ./ci/before-cache.sh run: ./ci/before-cache.sh
build11: build11:
name: Build and test on Java 11 name: Java 11
runs-on: ubuntu-latest runs-on: ubuntu-latest
# We want to know the test results of all matrix entries
continue-on-error: true
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Java 11 - name: Set up Java 11
@ -96,9 +102,7 @@ jobs:
# refresh cache every month to avoid unlimited growth # refresh cache every month to avoid unlimited growth
key: maven-localrepo-${{ steps.get-date.outputs.yearmonth }} key: maven-localrepo-${{ steps.get-date.outputs.yearmonth }}
- name: Run build script - name: Run build script
env: run: ./ci/build-github.sh
JDK: 11
run: ./ci/build-guthub.sh
shell: bash shell: bash
- name: Upload test reports (if Gradle failed) - name: Upload test reports (if Gradle failed)
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2

0
ci/before-cache.sh Normal file → Executable file
View File

18
ci/build-github.sh Normal file → Executable file
View File

@ -1,21 +1,23 @@
#! /bin/bash #! /bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
java -version java -version
./gradlew assemble ./gradlew assemble
if [ "$RDBMS" == 'mysql' ]; then if [ "$RDBMS" == 'mysql' ]; then
bash ../docker_db.sh mysql_5_7 bash $DIR/../docker_db.sh mysql_5_7
elif [ "$RDBMS" == 'mysql8' ]; then elif [ "$RDBMS" == 'mysql8' ]; then
bash ../docker_db.sh mysql_8_0 bash $DIR/../docker_db.sh mysql_8_0
elif [ "$RDBMS" == 'mariadb' ]; then elif [ "$RDBMS" == 'mariadb' ]; then
bash ../docker_db.sh mariadb bash $DIR/../docker_db.sh mariadb
elif [ "$RDBMS" == 'postgresql' ]; then elif [ "$RDBMS" == 'postgresql' ]; then
bash ../docker_db.sh postgresql_9_5 bash $DIR/../docker_db.sh postgresql_9_5
elif [ "$RDBMS" == 'db2' ]; then elif [ "$RDBMS" == 'db2' ]; then
bash ../docker_db.sh db2 bash $DIR/../docker_db.sh db2
elif [ "$RDBMS" == 'oracle' ]; then elif [ "$RDBMS" == 'oracle' ]; then
bash ../docker_db.sh oracle bash $DIR/../docker_db.sh oracle
elif [ "$RDBMS" == 'mssql' ]; then elif [ "$RDBMS" == 'mssql' ]; then
bash ../docker_db.sh mssql bash $DIR/../docker_db.sh mssql
fi fi
exec bash ./build.sh exec bash $DIR/build.sh

18
ci/build-travis.sh Normal file → Executable file
View File

@ -1,25 +1,27 @@
#! /bin/bash #! /bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
java -version java -version
./gradlew assemble ./gradlew assemble
if [ "$RDBMS" == 'mysql' ]; then if [ "$RDBMS" == 'mysql' ]; then
sudo service mysql stop sudo service mysql stop
bash ../docker_db.sh mysql_5_7 bash $DIR/../docker_db.sh mysql_5_7
elif [ "$RDBMS" == 'mysql8' ]; then elif [ "$RDBMS" == 'mysql8' ]; then
sudo service mysql stop sudo service mysql stop
bash ../docker_db.sh mysql_8_0 bash $DIR/../docker_db.sh mysql_8_0
elif [ "$RDBMS" == 'mariadb' ]; then elif [ "$RDBMS" == 'mariadb' ]; then
sudo service mysql stop sudo service mysql stop
bash ../docker_db.sh mariadb bash $DIR/../docker_db.sh mariadb
elif [ "$RDBMS" == 'postgresql' ]; then elif [ "$RDBMS" == 'postgresql' ]; then
sudo service postgres stop sudo service postgres stop
bash ../docker_db.sh postgresql_9_5 bash $DIR/../docker_db.sh postgresql_9_5
elif [ "$RDBMS" == 'db2' ]; then elif [ "$RDBMS" == 'db2' ]; then
bash ../docker_db.sh db2 bash $DIR/../docker_db.sh db2
elif [ "$RDBMS" == 'oracle' ]; then elif [ "$RDBMS" == 'oracle' ]; then
bash ../docker_db.sh oracle bash $DIR/../docker_db.sh oracle
elif [ "$RDBMS" == 'mssql' ]; then elif [ "$RDBMS" == 'mssql' ]; then
bash ../docker_db.sh mssql bash $DIR/../docker_db.sh mssql
fi fi
exec bash ./build.sh exec bash $DIR/build.sh

0
ci/build.sh Normal file → Executable file
View File