Merge pull request #49 from kenpb/feat-thymeleaf-starter #125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Test | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
ci-test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: hankcp/postgres-test:latest | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: ["5432:5432"] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Install PostgreSQL 11 client | |
run: | | |
sudo apt-get update | |
sudo apt-get install --yes --no-install-recommends postgresql-client | |
- run: | | |
psql -c 'create database "sbp";' -U postgres | |
psql -c 'create database "sbp-test";' -U postgres | |
env: | |
PGHOST: localhost | |
PGUSER: postgres | |
- run: ./gradlew doMigration | |
- run: ./gradlew copyDependencies buildApp check -PspringBootVersion=3.0.11 --rerun-tasks | |
- run: ./gradlew copyDependencies buildApp check -PspringBootVersion=3.1.10 --rerun-tasks | |
- run: ./gradlew copyDependencies buildApp check -PspringBootVersion=3.2.4 --rerun-tasks | |
publish-snapshot: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- run: ./gradlew publish -Pversion=-SNAPSHOT -P'signing.keyId=${{ secrets.signingKeyId }}' -P'signing.password=${{ secrets.signingPassword }}' -P'sonatypeUsername=${{ secrets.sonatypeUsername }}' -P'sonatypePassword=${{ secrets.sonatypePassword }}' --rerun-tasks |