-
Notifications
You must be signed in to change notification settings - Fork 15
91 lines (72 loc) · 2.36 KB
/
update_galata_references.yaml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Update Galata References
on:
issue_comment:
types: [created, edited]
permissions:
contents: write
pull-requests: write
defaults:
run:
shell: bash -l {0}
jobs:
update-galata-references:
name: Update Galata References
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'update galata') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure git to use https
run: git config --global hub.protocol https
- name: Checkout the branch from the PR that triggered the job
run: hub pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install node
uses: actions/setup-node@v2
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install
run: |
python -m pip install --upgrade pip
pip install twine wheel jupyter-packaging jupyterlab .
- name: Install Galata
run: |
yarn install
yarn playwright install chromium
working-directory: ui-tests
- name: Launch JupyterLab
run: yarn run start:detached
working-directory: ui-tests
- name: Wait for JupyterLab
uses: ifaxity/wait-on-action@v1
with:
resource: http-get://localhost:8988/api
timeout: 20000
- name: Generate updated Galata References
env:
TARGET_URL: http://127.0.0.1:8988
run: yarn run test:update
working-directory: ui-tests
- name: Compress screenshots
run: |
sudo apt install optipng
optipng *.png
working-directory: ui-tests/tests/bqplot-image-gl.test.ts-snapshots
- name: Commit reference images
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git pull
git add ui-tests/tests/bqplot-image-gl.test.ts-snapshots
git commit -m "chore: Update Galata References"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}