Skip to content

Java CI with Maven #105

Java CI with Maven

Java CI with Maven #105

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
pull_request:
schedule:
- cron: "0 2 * * 1-5"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Fail on whitespace errors
run: git show HEAD --check
- name: Run Spotless
run: mvn -s .travis.settings.xml -Dgithub.username=${{ github.actor }} -Dgithub.password=${{ secrets.GITHUB_TOKEN }} spotless:check -B
- name: Cache Pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install global requirements
run: pip3.10 install -r requirements.txt
- name: Run Black
run: black --fast --check --extend-exclude \/out .
- name: Install test requirements
run: pip3.10 install -r edu.cuny.hunter.hybridize.tests/requirements.txt
- name: Install with Maven
run: mvn -U -s .travis.settings.xml -Dgithub.username=${{ github.actor }} -Dgithub.password=${{ secrets.GITHUB_TOKEN }} -Dlogging.config.file=\${maven.multiModuleProjectDirectory}/logging.ci.properties -DtrimStackTrace=true -Dtycho.showEclipseLog=false install -B -q -DskipTests=true
- name: Print Python 3 version.
run: python3 --version
- name: Print Python 3.10 version.
run: python3.10 --version
- name: Clone our fork of PyDev
run: |
mkdir "$HOME/git"
pushd "$HOME/git"
git clone --depth=50 --branch=pydev_9_3 https://github.com/ponder-lab/Pydev.git
popd
- name: Test with Maven
run: mvn -U -s .travis.settings.xml -Dgithub.username=${{ github.actor }} -Dgithub.password=${{ secrets.GITHUB_TOKEN }} -Dlogging.config.file=\${maven.multiModuleProjectDirectory}/logging.ci.properties -DtrimStackTrace=true -Dtycho.showEclipseLog=false -B verify -Pjacoco coveralls:report
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.3.4