Skip to content

Commit

Permalink
Merge 71de6f1 into 94745ac
Browse files Browse the repository at this point in the history
  • Loading branch information
wlodarcp committed May 21, 2021
2 parents 94745ac + 71de6f1 commit 13e9d9d
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 48 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/java.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
on: [push, pull_request]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Pull postgress docker image for functional tests
run: docker pull postgres:9.6.12
- name: Build with maven & generate reports
env:
COVERALLS_REPO_KEY: ${{ secrets.COVERALLS_REPO_KEY }}
run: mvn clean verify jacoco:report coveralls:report
- name: Cache build files
uses: actions/cache@v2
id: cache-build
with:
path: ./*
key: ${{ github.sha }}
release:
name: Release
runs-on: ubuntu-latest
needs: build
#if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Retrieve files from cache
uses: actions/cache@v2
id: cache-build
with:
path: ./*
key: ${{ github.sha }}
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build judge-d-server docker image
run: mvn validate docker:build@build-docker -P docker-app -f ./judge-d-server/pom.xml
- name: Push judge-d docker image to DockerHub
run: docker push hltech/judge-d
- name: Push to heroku registry
run: |
docker login -u _ -p "$HEROKU_API_KEY" registry.heroku.com
docker tag hltech/judge-d registry.heroku.com/judge-d/web
docker push registry.heroku.com/judge-d/web
env:
HEROKU_API_KEY: ${{secrets.HEROKU_API_KEY}}
- name: Release judge-d on Heroku
run: |
heroku container:login
heroku container:release web -a $HEROKU_APP_NAME
env:
HEROKU_API_KEY: ${{secrets.HEROKU_API_KEY}}
HEROKU_APP_NAME : "judge-d"
- name: Build docker image for agent
run: mvn validate docker:build@build-docker -P docker-app -f ./judge-d-agent/pom.xml
- name: Publish judge-d-agent docker image to DockerHub
run: docker push hltech/judge-d-agent
47 changes: 0 additions & 47 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion judge-d-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.14.3</version>
<version>1.15.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 13e9d9d

Please sign in to comment.