Running CI via GitHub actions #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI with Gradle | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
checks: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Debug | ||
run: java -version | ||
run: env | grep JAVA | ||
Check failure on line 21 in .github/workflows/gradle.yml GitHub Actions / CI with GradleInvalid workflow file
|
||
run: env | grep ANDROID | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Debug | ||
run: java -version | ||
run: env | grep JAVA | ||
run: env | grep ANDROID | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
- name: Debug | ||
run: java -version | ||
run: env | grep JAVA | ||
run: env | grep ANDROID | ||
- name: Adding Google Services | ||
env: | ||
DATA: ${{ secrets.GOOGLE_SERVICES }} | ||
run: echo $DATA | base64 -di > ./example/google-services.json | ||
# - name: Build with Gradle Wrapper | ||
# run: ./gradlew build | ||
- name: Test with Gradle Wrapper | ||
run: ./gradlew test | ||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v4 | ||
if: success() || failure() # always run even if the previous step fails | ||
with: | ||
report_paths: '**/build/test-results/test*/TEST-*.xml' | ||
dependency-submission: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. | ||
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md | ||
- name: Generate and submit dependency graph | ||
uses: gradle/actions/dependency-submission@v4 |