-
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.
Merge pull request #1187 from thunderstore-io/visual-diff-ci-setup
Add visual diffing CI pipeline
- Loading branch information
Showing
19 changed files
with
2,023 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 |
---|---|---|
|
@@ -8,3 +8,6 @@ trim_trailing_whitespace = true | |
end_of_line = lf | ||
charset = utf-8 | ||
max_line_length = 88 | ||
|
||
[*.py] | ||
indent_size = 4 |
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,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 }} |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ node_modules | |
/.cache | ||
/build | ||
.env.development | ||
.env.production |
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,6 @@ | ||
node_modules/ | ||
/test-results/ | ||
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ | ||
build-storybook.log |
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,3 @@ | ||
version: 1 | ||
snapshot: | ||
widths: [375, 1200, 1920] |
Oops, something went wrong.