Skip to content

Update checker.yml

Update checker.yml #32

Workflow file for this run

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: Setup JDK
uses: actions/setup-java@v2
with:
java-version: '11'
- name: Install Gradle
run: |
sudo apt-get update
sudo apt-get install -y gradle
working-directory: android
- 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: Adjust gradlew permissions
run: |
ls -l android/gradlew
chmod +x android/gradlew
ls -l 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: Run lint
run: |
cd android
./gradlew lint
if: steps.check_build_dir.outputs.status == 'Build directory found'
- name: Run tests
run: |
cd android
./gradlew test
if: steps.check_build_dir.outputs.status == 'Build directory found'
- name: Run TWA validation script
run: |
cd android
./gradlew connectedAndroidTest
if: steps.check_build_dir.outputs.status == 'Build directory found'
- name: Cleanup
run: |
rm -rf android/.gradle
working-directory: android