Skip to content

Commit

Permalink
Merge pull request #1187 from thunderstore-io/visual-diff-ci-setup
Browse files Browse the repository at this point in the history
Add visual diffing CI pipeline
  • Loading branch information
MythicManiac committed Aug 28, 2024
2 parents 6d9611d + 1b25f8c commit 4a232c1
Show file tree
Hide file tree
Showing 19 changed files with 2,023 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ trim_trailing_whitespace = true
end_of_line = lf
charset = utf-8
max_line_length = 88

[*.py]
indent_size = 4
75 changes: 75 additions & 0 deletions .github/workflows/visual-diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: "Visual diff"

on:
push:
branches:
- "master"
pull_request:
branches:
- "**"

jobs:
get-node-version:
name: Get Node version
if: (
github.event_name != 'pull_request' && (
github.event_name != 'push' ||
github.actor != 'dependabot[bot]'
)
) || (
github.event_name == 'pull_request' && (
github.event.base.repo.id != github.event.head.repo.id ||
github.actor == 'dependabot[bot]'
)
)
runs-on: ubuntu-latest
outputs:
node-version: ${{ steps.get-node-version.outputs.node-version }}
steps:
- uses: actions/checkout@v4
- name: Check get-node-version version
uses: ./.github/actions/get-node-version
with:
package-json: .github/actions/get-node-version/package.json
- name: Get Node version
id: get-node-version
uses: ./.github/actions/get-node-version
visual-diff:
name: "Generate visual diffs"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup Python 3.10"
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: "Setup Node"
uses: actions/setup-node@v4
with:
node-version: ${{ needs.get-node-version.outputs.node-version }}
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Cache poetry venv
id: cache-poetry
uses: actions/cache@v4
with:
path: tools/visual-diff-ci/.venv
key: "poetry-${{ runner.os }}-\
${{ steps.setup-python.outputs.python-version }}-\
${{ hashFiles('tools/visual-diff-ci/poetry.lock') }}"
restore-keys: |
poetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-
- name: Install poetry dependencies
run: |
cd tools/visual-diff-ci/
poetry install
- name: Run visual diffing script
run: |
cd tools/visual-diff-ci/
poetry run python run_ci_script.py
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
1 change: 1 addition & 0 deletions apps/cyberstorm-remix/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
/.cache
/build
.env.development
.env.production
6 changes: 6 additions & 0 deletions tools/cyberstorm-playwright/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
build-storybook.log
3 changes: 3 additions & 0 deletions tools/cyberstorm-playwright/.percy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: 1
snapshot:
widths: [375, 1200, 1920]
Loading

0 comments on commit 4a232c1

Please sign in to comment.