mirror of
https://github.com/home-assistant/android
synced 2024-10-15 20:43:06 +00:00
Add database checks to PR workflow (#3000)
* Add database checks to PR workflow * Update step names
This commit is contained in:
parent
209497e0a2
commit
c7db22163e
19
.github/workflows/pr.yml
vendored
19
.github/workflows/pr.yml
vendored
|
@ -66,6 +66,15 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Check for modified DB schemas on branch
|
||||||
|
run: |
|
||||||
|
if git diff --name-only --diff-filter=DMR origin/master... | grep "^common/schemas"; then
|
||||||
|
echo -e "\n❌ Existing database schema modified, please increase the database version instead"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo -e "\n✔️ No changed database schemas on branch"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v3.6.0
|
uses: actions/setup-java@v3.6.0
|
||||||
with:
|
with:
|
||||||
|
@ -92,6 +101,16 @@ jobs:
|
||||||
- name: Build Debug APK
|
- name: Build Debug APK
|
||||||
run: ./gradlew assembleDebug
|
run: ./gradlew assembleDebug
|
||||||
|
|
||||||
|
- name: Check for missing/modified DB schemas after build
|
||||||
|
run: |
|
||||||
|
if [[ $(git status common/schemas --porcelain) ]]; then
|
||||||
|
echo $(git status common/schemas --porcelain)
|
||||||
|
echo -e "\n❌ Found uncommitted changes in database schema directory, please make sure to include all changes in your commit(s)"
|
||||||
|
exit 1;
|
||||||
|
else
|
||||||
|
echo -e "\n✔️ No changes in database schema directory after build"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Archive Debug Build
|
- name: Archive Debug Build
|
||||||
uses: kittaakos/upload-artifact-as-is@v0
|
uses: kittaakos/upload-artifact-as-is@v0
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue