Refactoring a lot #15
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
#You can run this locally like followings | |
#act -W .github/workflows/build-test.yml | |
name: build and test | |
on: [ pull_request, push ] | |
jobs: | |
# nektos/act does not support Reusable workflow and does not use Reusable workflow for development productivity | |
jvm-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
java-package: 'jdk' | |
cache: maven | |
- name: Test with Maven on JVM | |
run: bash bin/test.sh | |
native-test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: 'latest' | |
java-version: '11' | |
components: 'native-image' | |
- name: Test to create native image | |
run: | | |
bash bin/native-image-test.sh | |
./artifact-test/target/artifact-test | |
env: | |
POSTGRES_HOST: localhost | |
POSTGRES_PASSWORD: postgres |