Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
change gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosthe19916 committed Dec 6, 2020
1 parent ce13b24 commit 5d0a5bb
Showing 1 changed file with 1 addition and 52 deletions.
53 changes: 1 addition & 52 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,71 +12,20 @@ on:
- cron: '0 0 * * *'

jobs:
build-jdk11:
name: "JDK 11 Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: n1hility/cancel-previous-runs@v2
if: github.event_name == 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 11
# Uses sha for added security since tags can be updated
uses: joschi/setup-jdk@b9cc6eabf7e7e3889766b5cee486f874c9e1bd2d
with:
java-version: 11
- name: Compute cache restore key
# Always recompute on a push so that the maven repo doesnt grow indefinitely with old versions
run: |
if ${{ github.event_name == 'pull_request' }}; then echo "::set-env name=COMPUTED_RESTORE_KEY::q2maven-"; fi
- name: Cache Maven Repository
id: cache-maven
uses: n1hility/cache@v2
with:
path: ~/.m2/repository
# Improves the reusability of the cache to limit key changes
key: q2maven-${{ hashFiles('pom.xml') }}
restore-keys: ${{ env.COMPUTED_RESTORE_KEY }}
restore-only: ${{ github.event_name == 'pull_request' }}
- name: Build
run: |
mvn -e -B -DskipTests=true -DskipDocs clean install
- name: Tar Maven Repo
shell: bash
run: tar -czvf maven-repo.tgz -C ~ .m2/repository
- name: Persist Maven Repo
uses: actions/upload-artifact@v1
with:
name: maven-repo
path: maven-repo.tgz

linux-jvm-tests:
name: JDK ${{matrix.java-version}} JVM Tests
timeout-minutes: 120
needs: build-jdk11
strategy:
fail-fast: false
matrix:
java-version: [8, 11, 13]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java-version }}
# Uses sha for added security since tags can be updated
uses: joschi/setup-jdk@b9cc6eabf7e7e3889766b5cee486f874c9e1bd2d
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Download Maven Repo
uses: actions/download-artifact@v1
with:
name: maven-repo
path: .
- name: Extract Maven Repo
shell: bash
run: tar -xzvf maven-repo.tgz -C ~
- name: Build with Maven
run: mvn install
- name: Prepare failure archive (if maven failed)
Expand Down

0 comments on commit 5d0a5bb

Please sign in to comment.