Skip to content

Commit

Permalink
DAT-4607 Travis -> GHA (#68)
Browse files Browse the repository at this point in the history
* DAT-4607 Travis -> GHA

* DAT-4607 Travis -> GHA

* DAT-4607 Travis -> GHA

* DAT-4607 Travis -> GHA

* DAT-4607 Travis -> GHA

* DAT-4607 Travis -> GHA

* DAT-4607 Travis -> GH Actions

* remove travis file

* reduce matrix during debug

* use cassandra container as client

* use cassandra container as client

* use cassandra container as client

* use cassandra container as client

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* remove java 16

* only test cassandra 3.0 and 3.11

Co-authored-by: Alec Applegate <[email protected]>
Co-authored-by: Jake Newton <[email protected]>
  • Loading branch information
3 people authored Apr 15, 2021
1 parent 2480461 commit d5cc645
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 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 Extention

on: [ pull_request]

jobs:
test:
name: Java ${{ matrix.java }}, Cassandra ${{ matrix.cassandra }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [8, 11]
cassandra: ['3.0', '3.11']
services:
cassandra:
image: cassandra:${{ matrix.cassandra }}
ports:
- 9042:9042
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: Init Cassandra Database
run: |
sleep 45
docker run --network ${{ job.services.cassandra.network }} --rm -v $(pwd):/tmp cassandra:${{ matrix.cassandra }} cqlsh -f /tmp/test.cql cassandra
- 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-cassandra
path: target/*.jar


File renamed without changes.

0 comments on commit d5cc645

Please sign in to comment.