Skip to content

Commit

Permalink
IOS-9612 Add Record Screenshots GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroruizponce authored Jan 19, 2024
1 parent a4e929a commit 854c4d0
Show file tree
Hide file tree
Showing 665 changed files with 49 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/generate-mistica-tokens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: Generate Mistica Tokens
on:
workflow_dispatch:
inputs:
ref:
description: 'mistica-design repo changeset or branch'
required: false
ref:
description: 'mistica-design repo changeset or branch'
required: false
default: 'production'

jobs:
get-design-tokens:
name: Get Design Tokens
runs-on: self-hosted-novum-mac
name: Get Design Tokens
runs-on: self-hosted-novum-mac
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v3

- name: Generate Skin
run: make skin ref=${{github.event.inputs.ref}}
Expand All @@ -25,7 +25,7 @@ jobs:
token: ${{ secrets.NOVUM_PRIVATE_REPOS }}
add-paths: 'Sources/MisticaCommon/*'
commit-message: 'feat(skin): update design tokens'
title: 'feat(skin): update design tokens from mistica-design branch: ${{github.event.inputs.ref}}'
title: 'feat(skin): update design tokens from mistica-design branch: ${{github.event.inputs.ref}}'
branch: 'import-design-tokens'
team-reviewers: 'ios'
delete-branch: true
42 changes: 42 additions & 0 deletions .github/workflows/record-screenshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Record screenshots

on:
workflow_dispatch:

jobs:
record-screenshots:
name: Record screenshots
runs-on: self-hosted-novum-mac
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Check branch is not main
run: |
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
if [ "$BRANCH_NAME" == "main" ]; then
echo "::error:: Record screenshots aborted since it's on the main branch."
exit 0
fi
- name: Enable screenshots recording
run: |
find . -type f -name "*.swift" -exec sed -i '' 's/isRecording = false/isRecording = true/' {} +
- name: Launch tests and record screenshots
run: make test
continue-on-error: true

- name: Disable screenshots recording
run: |
find . -type f -name "*.swift" -exec sed -i '' 's/isRecording = true/isRecording = false/' {} +
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: '*.png'
commit_message: Record screenshots automatically launched from GH action
env:
GITHUB_TOKEN: ${{ secrets.NOVUM_PRIVATE_REPOS }}


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 854c4d0

Please sign in to comment.