-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.4 KB
/
checker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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