skerge/.forgejo/workflows/pull_request.yml
Workflow config file is invalid. Please check your config file: yaml: unmarshal errors: line 21: mapping key "runs-on" already defined at line 10 line 24: mapping key "steps" already defined at line 12

58 lines
1.5 KiB
YAML

name: Build & Test
on:
pull_request:
push:
branches: [ main ]
jobs:
validate:
runs-on: ubuntu-latest
name: Validate
steps:
- uses: actions/checkout@v2
- name: set up JDK
uses: https://git.wbrawner.com/actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Validate Gradle Wrapper
uses: https://git.wbrawner.com/gradle/wrapper-validation-action@v1
runs-on: ubuntu-latest
needs:
- validate
steps:
- uses: actions/checkout@v2
- name: set up JDK
uses: https://git.wbrawner.com/actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Run unit tests
uses: https://git.wbrawner.com/gradle/gradle-build-action@v2
with:
arguments: testDebugUnitTest
- name: Publish JUnit Results
uses: dorny/test-reporter@v1
if: always()
with:
name: Unit Test Results
path: "*/build/test-results/*/*.xml"
reporter: java-junit
fail-on-error: true
ui_tests:
runs-on: ubuntu-latest
name: Run UI Tests
needs:
- validate
steps:
- uses: actions/checkout@v2
- name: set up JDK
uses: https://git.wbrawner.com/actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Build with Gradle
uses: https://git.wbrawner.com/gradle/gradle-build-action@v2
with:
arguments: assembleDebug assembleDebugAndroidTest