#Tests fails on GitHub Actions but not locally
1 messages ยท Page 1 of 1 (latest)
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
That doesn't look wrong. Could you show the log of the action?
error?
We had an issue with the gradle-build-action upgrading itself to use gradle 8.0 which caused some issues for us
hmm not sure, try specifying the gradle version and use gradle instead of gradlew in the Build with Gradle section under with add gradle-version: 7.4.2 (or whatever version you're using)
it could be permissions or attributes on the gradle wrapper though could also be the fix
Bro, my gradle.yml look like:
Must i change it?
I guess problem in this file
This is my entire project, u can check it
idk how to resolve this problem, mate...
Try my suggestion?
No, i need to upgrade gradle version?
I tired to upgrade gradle to 8.0
May be it will help
you need 6.7 from the look sof it
its still using gradle 7
hmm, try putting the version before build
but if it still don't work - fix your gradle.build to be correct
Where should I put gradle-version: 6.7 in gradle.yml exactly?
Like that?
No bro, same problem
May be i do it incorrectly?
was there a new error?
Try this:
name: Java CI with Gradle
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11 and Gradle 6.7
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
gradle-version: '6.7'
- name: Build with Gradle
uses: gradle/[email protected]
with:
arguments: build
I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐
Maybe a problem in the code, but why all tests are successful locally, and in CI they fail
Bro I'm very stupid to resolve this...
Java version mismatch
warning: as of release 10, 'var' is a restricted local variable type and cannot be used for type declarations or as the element type of an array
so make your java version the same
same what?
Update or roll back
Yep
file > project structure
what's the version mentioned there?
take a screenshot if u can
any you want
I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐
Idk what i must to do....