テストを追加 #39
This file contains hidden or 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: Run Gradle on PRs | |
on: pull_request | |
jobs: | |
ktlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Change Permission | |
run: chmod +x ./gradlew | |
- name: Execute Ktlint Check | |
run: ./gradlew ktlintCheck | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Change Permission | |
run: chmod +x ./gradlew | |
- name: Execute Unit Tests | |
run: ./gradlew test jacocoTestReport | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-results | |
path: app/build/test-results | |
- name: Upload Coverage Report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: app/build/reports/tests/testDebugUnitTest/ |