-
Notifications
You must be signed in to change notification settings - Fork 9
76 lines (71 loc) · 2.33 KB
/
Copy pathpull-request.yml
File metadata and controls
76 lines (71 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: pull-request
permissions:
contents: read
pull-requests: write
on:
pull_request:
types: [opened, synchronize]
paths-ignore:
- '**/__vis__/**/__baselines__/**'
jobs:
verify:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
node-version:
- lts/-1
- lts/*
runs-on: ${{ matrix.os }}
env:
PLAYWRIGHT_PATH: ${{ matrix.os == 'windows-latest' && 'C:\\Users\\runneradmin\\AppData\\Local\\ms-playwright' || '~/.cache/ms-playwright' }}
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install Dependencies
run: pnpm install
- name: Install playwright browsers
uses: repobuddy/.github/.github/actions/setup-playwright@main
- name: Verify
uses: nick-fields/retry@v4
with:
timeout_minutes: 10
max_attempts: 3
command: pnpm verify:ci
- run: git add .
- name: Detect snapshot changes
uses: dorny/paths-filter@v4
id: snapshot-changes
with:
base: HEAD
filters: |
snapshots:
- '*/*/__vis__/**/__baselines__/**'
- name: Create Pull Request
if: matrix.node-version == 'lts/*' && steps.snapshot-changes.outputs.snapshots == 'true' && !startsWith(github.head_ref, 'vis-bot') && !startsWith(github.head_ref, 'dependabot') && !startsWith(github.head_ref, 'renovate')
uses: peter-evans/create-pull-request@v8
with:
commit-message: "test(${{matrix.os}}/lts-latest): update snapshot"
token: ${{ secrets.CI_GITHUB_TOKEN }}
title: "test(${{matrix.os}}/lts-latest): update snapshot"
body: This PR updates the snapshot for ${{matrix.os}} node lts-latest"
branch: vis-bot/update-snapshot/${{ github.head_ref }}-${{ matrix.os }}-lts-latest
base: ${{ github.head_ref }}
labels: "snapshot"
draft: false
all-checks:
needs: [verify]
runs-on: ubuntu-latest
if: always()
steps:
- name: All checks passed
run: |
if [[ "${{ needs.verify.result }}" != "success" ]]; then
exit 1
fi