-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (52 loc) · 1.51 KB
/
auto-update-test-log.yml
File metadata and controls
66 lines (52 loc) · 1.51 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
name: Generate and Commit IdMap files and test log files
on:
push:
branches:
- selenium-base
paths-ignore:
- 'id-map-data/**'
- 'output/old/**'
permissions:
packages: read
contents: write
jobs:
generate-and-commit:
runs-on: ubuntu-latest
env:
GITHUB_PACKAGES_NPM_READ_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm ci
- name: ID embedding
run: |
chmod +x ./scripts/id-embedding/index.sh
./scripts/id-embedding/index.sh
- name: Set test config
run: sed -i 's/version=new/version=old/g' config.properties
- name: Start server
run: |
npm run dev &
echo $! > server.pid
sleep 30
- name: Run e2e tests
run: node --test
- name: Stop server
run: kill $(cat server.pid)
- name: Commit only IdMap files and test log files
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add id-map-data/*
git add output/old/*
if ! git diff --cached --quiet; then
git commit -m "generate: generate IdMap files and test log files"
git push
else
echo "No changes to commit."
fi