From 1d0d8979f0bd40e6dda3158b4b97ca2a5a9dbbcb Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Wed, 31 Mar 2021 08:45:42 +0900 Subject: [PATCH 1/2] Create maven.yml --- .github/workflows/maven.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..7826c99 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,25 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Build with Maven + run: mvn -B package --file pom.xml -Dmaven.test.skip=true From 2ddc3548a97c3add4d54b3b41ab57c065a1b7b76 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Sun, 16 May 2021 09:17:04 +0900 Subject: [PATCH 2/2] Enable tests with MongoDB. Signed-off-by: Masaki Muranaka --- .github/workflows/maven.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7826c99..107fb7c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -12,14 +12,28 @@ on: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + jdk-version: [11] + mongodb-version: [3.6] steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 + + - name: Start MongoDB + uses: supercharge/mongodb-github-action@1.4.0 + with: + mongodb-version: ${{ matrix.mongodb-version }} + mongodb-port: 53579 + + - name: Prepare DB + run: 'mongo mongodb://localhost:53579/bcdb mongo-init.d/init.js' + + - name: Set up JDK ${{ matrix.jdk-version }} uses: actions/setup-java@v1 with: - java-version: 11 + java-version: ${{ matrix.jdk-version }} + - name: Build with Maven - run: mvn -B package --file pom.xml -Dmaven.test.skip=true + run: mvn -B package --file pom.xml