Skip to content

Commit

Permalink
Merge branch 'SeedSigner:screenshot_diff_workflow' into screenshot_di…
Browse files Browse the repository at this point in the history
…ff_workflow
  • Loading branch information
fedebuyito authored Jan 6, 2025
2 parents 3588536 + 9a6b1c1 commit 278e99e
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,14 @@ jobs:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- name: Setup Environment (PR)
if: ${{ github.event_name == 'pull_request' }}
shell: bash
run: |
echo "LAST_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> ${GITHUB_ENV}
- name: Setup Environment (Push)
if: ${{ github.event_name == 'push' }}
shell: bash
run: |
echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV}
- name: Set build tag
shell: bash
run: |
echo "BUILD_TAG=${LAST_COMMIT_SHA:0:7}" >> $GITHUB_ENV
- name: Checkout main repo 'dev'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: 'SeedSigner/seedsigner'
ref: dev
submodules: true
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand All @@ -56,16 +42,16 @@ jobs:
run: |
mkdir -p artifacts/dev
python -m pytest tests/screenshot_generator/generator.py
sleep 5
sleep 10
mv ./seedsigner-screenshots/* ./artifacts/dev/
- name: Checkout updated translations (PR)
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request' }}
with:
path: src/seedsigner/resources/seedsigner-translations
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout updated translations (Push)
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ github.event_name == 'push' }}
with:
path: src/seedsigner/resources/seedsigner-translations
Expand All @@ -80,7 +66,7 @@ jobs:
rm -rf seedsigner-screenshots
mkdir -p artifacts/$BRANCH_NAME
python -m pytest tests/screenshot_generator/generator.py
sleep 5
sleep 10
mv ./seedsigner-screenshots/* ./artifacts/$BRANCH_NAME/
- name: Diff screenshots
run: |
Expand All @@ -93,7 +79,7 @@ jobs:
mv ./artifacts/diff/* ./artifacts
rmdir ./artifacts/diff
- name: Archive CI Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ci-artifacts
path: artifacts/**
Expand Down

0 comments on commit 278e99e

Please sign in to comment.