Update checker.yml #28
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: Checker | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Check TWA | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y openjdk-11-jdk | |
working-directory: android | |
- name: Verify gradlew existence | |
run: | | |
ls -l android/gradlew | |
if: steps.check_build_dir.outputs.status != 'Build directory found' | |
- name: Adjust gradlew permissions | |
run: | | |
chmod +x android/gradlew | |
if: steps.check_build_dir.outputs.status != 'Build directory found' | |
- name: Verify gradlew permissions | |
run: | | |
ls -l android/gradlew | |
if: steps.check_build_dir.outputs.status != 'Build directory found' | |
- name: Check if build directory exists | |
id: check_build_dir | |
run: test -d android/build && echo "Build directory found" || echo "Build directory not found" | |
- name: Run lint | |
run: ./gradlew lint || exit 1 | |
working-directory: android | |
- name: Run tests | |
run: ./gradlew test || exit 1 | |
working-directory: android | |
- name: Run TWA validation script | |
run: ./gradlew connectedAndroidTest || exit 1 | |
working-directory: android | |
- name: Cleanup | |
run: | | |
rm -rf android/.gradle | |
working-directory: android |