-
Notifications
You must be signed in to change notification settings - Fork 4
74 lines (74 loc) · 2.28 KB
/
kraken_vrt.yml
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
name: Kraken VRT Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
kraken-vrt:
permissions:
contents: write
timeout-minutes: 30
runs-on: ubuntu-latest
env:
GHOST_VERSION_PRE: 4.36
GHOST_VERSION_POST: 4.41.1
GHOST_VRT: true
steps:
- uses: actions/checkout@v3
with:
path: repo
- uses: actions/checkout@v3
with:
path: gh-pages
ref: gh-pages
fetch-depth: 10
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Install system dependencies
run: sudo apt-get install -y android-tools-adb
- name: Setup chrome driver
uses: nanasess/setup-chromedriver@v1
- name: Setup docker
uses: docker-practice/actions-setup-docker@v1
- name: Pull docker image
run: |
docker image pull ghost:${GHOST_VERSION_PRE}
docker image pull ghost:${GHOST_VERSION_POST}
- name: Install node dependencies
working-directory: repo
run: npm ci
- name: Run kraken tests with pre version
working-directory: repo
run: GHOST_VERSION=${GHOST_VERSION_PRE} npm run kraken
- name: Run kraken tests with post version
working-directory: repo
run: GHOST_VERSION=${GHOST_VERSION_POST} npm run kraken
- name: Generate the html report
working-directory: repo
run: npm run reporter -- --process kraken --prev ${GHOST_VERSION_PRE} --post ${GHOST_VERSION_POST}
- name: Setup gh-pages
working-directory: gh-pages
run: |
rm -rf screenshots/kraken kraken.html || true
mv ../repo/screenshots/kraken screenshots/kraken
mv ../repo/kraken.html kraken.html
- name: Commit files
working-directory: gh-pages
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
# Move to the first commit of the repository
git reset --soft `git rev-list --max-parents=0 HEAD`
git add --all
git commit -m "VRT reports update" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: gh-pages