Skip to content

Java CI

Java CI #678

Workflow file for this run

name: Java CI
on:
schedule:
- cron: '0 4 * * *'
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
java: [ '17.0.4+8' ]
steps:
- name: install git secrets
run: |
wget --no-verbose -O git-secrets-1.3.0.tar.gz https://github.com/awslabs/git-secrets/archive/1.3.0.tar.gz
tar -zxf git-secrets-1.3.0.tar.gz
cd git-secrets-1.3.0
sudo make install
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
# Step that does that actual cache save and restore
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Get latest snapshot version
run: echo 'LATEST_VERSION='$(curl "https://artifacts.oicr.on.ca/artifactory/api/search/latestVersion?g=io.dockstore&a=dockstore&repos=collab-snapshot&v=*") >> $GITHUB_ENV
- name: Build with mvnw
run: ./mvnw clean test -Punit-tests -Ddockstore-core.version=${{ env.LATEST_VERSION }} -B -ntp -U
- name: Check what changed
run: git diff
- name: Post to a Slack channel on failure
if: failure()
id: slack
uses: slackapi/[email protected]
with:
payload: "{\"blocks\":[{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"dockstore-cli/.github/workflows/cron.yml has failed!\"}}]}"
channel-id: 'CTWPH9Q03' # Slack channel id to post message
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK