Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding unit tests automation #871

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Java Unit Tests

on:
workflow_run:
workflows: ['Validate Gradle Wrapper']
types: [completed]
branches:
- 'main'

jobs:
tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- name: Enable gradle wrapper execution
run: chmod +x gradlew
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really needed? gradlew as execution permission in the git repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually didn't get to test this, when running with the current version of gradle I get:

* What went wrong:
An exception occurred applying plugin request [id: 'de.thetaphi.forbiddenapis', version: '3.4']
> Failed to apply plugin 'de.thetaphi.forbiddenapis'.
   > Could not create plugin of type 'ForbiddenApisPlugin'.
      > BUG! exception in phase 'semantic analysis' in source unit 'jar:file:.../forbiddenapis-3.4.jar!/de/thetaphi/forbiddenapis/gradle/plugin-init.groovy' Unsupported class file major version 65

which I solved only by updating gradle, but I'm not sure we want to update gradle just for this.


- name: Run java client tests
run: ./gradlew test -p java-client
Loading