Skip to content

Commit

Permalink
Merge pull request #125 from liquibase/DAT-4607
Browse files Browse the repository at this point in the history
DAT-4607 Travis -> GHA
  • Loading branch information
r2-lf committed May 12, 2021
2 parents 8af6190 + ead13ac commit fc615ed
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 15 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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: Build and Test Extension

on: [ pull_request]

jobs:
test:
name: Java ${{ matrix.java }}, Mongo ${{ matrix.mongo }}
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11, 16]
mongo: [3.6, 4.0, 4.2, 4.4]
services:
mongo:
image: mongo:${{ matrix.mongo }}
env:
name: mongodb
ports:
- 27017-27019:27017-27019
steps:
- uses: actions/checkout@v2
- name: Cache Local Maven Repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Test With Maven
run: mvn -B test --file pom.xml

build:
needs: [test]
name: Build Artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache Local Maven Repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Build With Maven
run: mvn -B package -DskipTests --file pom.xml
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: liquibase-mongodb
path: target/*.jar
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

0 comments on commit fc615ed

Please sign in to comment.