-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 1.86 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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'
java-package: 'jdk'
architecture: 'x64'
check-latest: false
server-id: 'github'
server-username: ${{ github.actor }}
server-password: ${{ secrets.GITHUB_TOKEN }}
overwrite-settings: true
job-status: 'success'
distribution: 'adopt'
- 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