Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #27 from Ottovsky/master
Browse files Browse the repository at this point in the history
add github workflow
  • Loading branch information
cewood authored Nov 24, 2020
2 parents 53b73cf + cd0d2ce commit 7797af5
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
63 changes: 63 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: ci

on:
push:
branches:
- "*" # run for branches
tags:
- "*" # run for tags
pull_request:
branches:
- "*" # run for branches
tags:
- "*" # run for tags

jobs:
test:
runs-on: ubuntu-latest
env:
GROUP: weaveworksdemos
COMMIT: ${{ github.sha }}
REPO: shipping
steps:
- uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build with Maven
run: mvn -B -DskipTests package --file pom.xml

- name: Unit Tests
run: mvn -q test

- name: Integration Tests
run: mvn integration-test

# Upload coverage results to coveralls
- name: Submit Coveralls
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: mvn -DrepoToken=${COVERALLS_TOKEN} -DserviceJobId=${GITHUB_RUN_ID} -Dbranch=${GITHUB_REF} -DpullRequest=${GITHUB_HEAD_REF} -DserviceName=GITHUB verify jacoco:report coveralls:report

# Push to dockerhub
- name: Push to Docker Hub
uses: docker/build-push-action@v1
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master'
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
dockerfile: docker/shipping/Dockerfile
path: target/
repository: ${{ env.GROUP }}/${{ env.REPO }}
tag_with_ref: true
tag_with_sha: true
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: required
services:
- docker
jdk:
- oraclejdk8
- oraclejdk11
install: true
env:
- GROUP=weaveworksdemos COMMIT=$TRAVIS_COMMIT TAG=$TRAVIS_TAG REPO=shipping;
Expand Down

0 comments on commit 7797af5

Please sign in to comment.