-
Notifications
You must be signed in to change notification settings - Fork 73
113 lines (92 loc) · 2.88 KB
/
ci_checks.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: CI Checks
on:
pull_request:
workflow_call:
inputs:
run-build-checks:
default: true
type: boolean
description: True to run build checks
concurrency:
group: ci-${{ github.head_ref }}
cancel-in-progress: true
jobs:
verify_pr_has_story_link:
runs-on: [ ubuntu-latest ]
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Verify PR description
run: .github/scripts/story_link_check.sh '${{ github.event.pull_request.body }}'
verify_changelog_was_updated:
runs-on: [ ubuntu-latest ]
if: github.event_name == 'pull_request'
steps:
- name: Checkout master
uses: actions/checkout@v4
with:
ref: master
path: master
- name: Checkout current
uses: actions/checkout@v4
with:
path: current
- name: Verify CHANGELOG was updated
run: current/.github/scripts/verify_file_was_changed.sh master/CHANGELOG.md current/CHANGELOG.md
lint:
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'
- name: QA Lint
run: ./gradlew --build-cache --no-daemon lint
unit_tests:
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'
- name: Unit Tests
run: |
./gradlew --build-cache --no-daemon test -x :app:test;
./gradlew --build-cache --no-daemon testQaDebugUnitTest;
# TODO: Add Android integration tests once [SC-13775] is resolved
verify_room_schemas:
runs-on: [ ubuntu-latest ]
steps:
- name: Checkout master
uses: actions/checkout@v4
with:
ref: master
path: master
- name: Checkout current
uses: actions/checkout@v4
with:
path: current
- name: Verify existing Room schemas are not modified
run: current/.github/scripts/compare_directory_contents.sh master/app/schemas/org.simple.clinic.AppDatabase current/app/schemas/org.simple.clinic.AppDatabase
fix_strings_ellipsise:
runs-on: [ ubuntu-latest ]
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
fetch-depth: 0
token: ${{ secrets.SERVICES_ACCESS_TOKEN }}
- name: Fix ellipsise in strings
run: .github/scripts/strings_reader.py
- name: Commit and push
env:
USER_NAME: ${{ secrets.USER_NAME }}
USER_EMAIL: ${{ secrets.USER_EMAIL }}
run: .github/scripts/commit_and_push_string_fixes.sh