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

Fixes for Unit tests and supports GitHub Actions #527

Merged
merged 3 commits into from
Jun 5, 2020

Conversation

johnjaylward
Copy link
Contributor

@johnjaylward johnjaylward commented Jun 5, 2020

What problem does this code solve?

Fixes #523

  • Fixes tests running in Eclipse. Simply right-click and select "Run As -> JUnit Test"
    image
  • Restore unit tests in JSONObjectTest
  • Uses work from @viveksacademia4git to get basic GitHub Actions working so test cases are auto-run for merge requests

Risks
LOW/None. Only Tests were corrected

Changes to the API?
No

Will this require a new release?
No

Should the documentation be updated?
No

Does it break the unit tests?
No, it fixes them

Was any code refactored in this commit?
Only Test cases to make the items being tested simpler to follow and verify.

Review status
APPROVED
No comment window this time

@johnjaylward johnjaylward changed the title GitHub action Fixes for Unit tests and supports GitHub Actions Jun 5, 2020
@johnjaylward johnjaylward marked this pull request as ready for review June 5, 2020 23:10
@stleary
Copy link
Owner

stleary commented Jun 5, 2020

Confirmed successful build and unit test with gradle 6.4, maven 3.2.3, Eclipse Luna, Java 1.8.0_05.
Unit tests were also successful in Eclipse with Java 1.6 and 1.7.

@stleary stleary merged commit 601114e into stleary:master Jun 5, 2020
@stleary
Copy link
Owner

stleary commented Jun 5, 2020

Thanks, nice work. Will check GitHub actions on the next PR.

@johnjaylward
Copy link
Contributor Author

You can see what it looks like now

https://github.com/stleary/JSON-java/actions/runs/126495486

It ran the jobs after you merged

@stleary
Copy link
Owner

stleary commented Jun 6, 2020

I get that is runs on PR, but was not expecting it to run on merge:

on:
  push:
    # branches: [ master ]
  pull_request:
    branches: [ master ]

@johnjaylward
Copy link
Contributor Author

With the push.branches qualifier commented, it will run on a push to any branch. Since I was testing it on a non-master branch in my fork, I commented that out.

It looks like github lets you create as many of these job files as you want, so you should be able to create one that triggers when a tag is created and then does the push to maven central for you.

@johnjaylward johnjaylward deleted the GithubAction branch June 6, 2020 04:27
@johnjaylward
Copy link
Contributor Author

As a side note, the secret key for deployment would go in the project settings -> secrets area, which only you would have access to

https://github.com/stleary/JSON-java/settings/secrets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit tests appear to be broken - recent merge?
3 participants