-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a Job to generate snapshots (#276)
* Add GH Action to create paparazzi golden images on a MacOS machine * Upload generated golden images to the GH Action * Add script to commit and push golden image changes to the branch * Fix paths in the GH Action * Make `commit-and-push` script executable * Paparazzi Golden Images * Change runner to `ubuntu-latest` * Paparazzi Golden Images * Use GitHub push action * Enable LFS in GH Action CI --------- Co-authored-by: GitHub Actions Bot <[email protected]>
- Loading branch information
1 parent
16f5cd0
commit 573b2c0
Showing
17 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Generate Paparazzi Golden Images | ||
|
||
env: | ||
# The name of the main module repository | ||
main_project_module: designsystem | ||
|
||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
ci_job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: 'true' | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Set Up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' # See 'Supported distributions' for available options | ||
java-version: '17' | ||
cache: 'gradle' | ||
|
||
- name: Change wrapper permissions | ||
run: chmod +x ./gradlew | ||
|
||
- name: Generate Golden Images | ||
run: ./gradlew designsystem:recordPaparazziDebug | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: GoldenImages | ||
path: ./designsystem/src/test/snapshots/ | ||
if-no-files-found: 'error' | ||
|
||
- name: Commit Changes | ||
run: .github/workflows/scripts/commit-changes.sh | ||
|
||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
readonly GIT_HAS_CHANGES=1 # 0 = clean, 1 = dirty | ||
|
||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<[email protected]>" | ||
|
||
# Following git command checks the git diff of staged files | ||
# and assigns the exit code to GIT_DIFF_STATUS variable. | ||
git diff --quiet; GIT_DIFF_STATUS=$? | ||
|
||
# If the GIT_DIFF_STATUS is 1 (GIT_HAS_CHANGES) then we know | ||
# there are changes and we can commit the changes and push | ||
# them to new branch | ||
if [[ ${GIT_DIFF_STATUS} -eq ${GIT_HAS_CHANGES} ]]; then | ||
git add -A | ||
git commit -m "Paparazzi Golden Images" | ||
|
||
exit 0 | ||
fi |
Binary file modified
BIN
-28.1 KB
(0.45%)
...rg.hisp.dhis.mobile.ui.designsystem_AssistChipSnapshotTest_launchAssistChip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-34.9 KB
(0.36%)
...rg.hisp.dhis.mobile.ui.designsystem_ButtonSnapshotTest_launchButtonSnapshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-126 KB
(0.10%)
...rg.hisp.dhis.mobile.ui.designsystem_CardDetailSnapshotTest_launchCardDetail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-43.6 KB
(0.29%)
...shots/images/org.hisp.dhis.mobile.ui.designsystem_FABSnapshotTest_launchFAB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-75.6 KB
(0.17%)
...isp.dhis.mobile.ui.designsystem_InputAgeSnapshotTest_launchInputAgeSnapshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-38.7 KB
(0.33%)
...p.dhis.mobile.ui.designsystem_InputCheckboxSnapshotTest_launchInputCheckBox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-8.05 KB
(1.5%)
...mages/org.hisp.dhis.mobile.ui.designsystem_InputChipSnapshotTest_launchChip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-40.7 KB
(0.31%)
...p.dhis.mobile.ui.designsystem_InputDropDownSnapshotTest_launchInputDropDown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-38 KB
(0.33%)
...dhis.mobile.ui.designsystem_InputIndicatorSnapshotTest_launchIndicatorInput.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-64.4 KB
(0.20%)
...s/org.hisp.dhis.mobile.ui.designsystem_InputMatrixSnapshotTest_launchMatrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-41.9 KB
(0.30%)
....mobile.ui.designsystem_InputRadioButtonSnapshotTest_launchInputRadioButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-61.7 KB
(0.21%)
...g.hisp.dhis.mobile.ui.designsystem_InputSequentialSnapshotTest_launchMatrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-121 KB
(0.11%)
...es/org.hisp.dhis.mobile.ui.designsystem_ListCardSnapshotTest_launchListCard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-66 KB
(0.19%)
...es/org.hisp.dhis.mobile.ui.designsystem_LoginSnapshotTest_launchLoginScreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.