-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (62 loc) · 2.12 KB
/
fix-e2e.yml
File metadata and controls
80 lines (62 loc) · 2.12 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
77
78
79
80
name: Run e2e test fix process when PR created or updated
on:
pull_request:
permissions:
packages: read
contents: read
pull-requests: write
jobs:
e2e-test:
runs-on: ubuntu-latest
env:
GITHUB_PACKAGES_NPM_READ_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm ci
- name: Download gumtree
run: docker pull rozelin/gumtree:latest
- name: Set branch environment variables
run: |
echo "REMOTE=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
echo "LOCAL=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
# - name: Diff matching
# run: |
# chmod +x ./scripts/diff-match/index.sh
# ./scripts/diff-match/index.sh ${{ github.event.pull_request.base.ref }} ${{ github.event.pull_request.head.ref }}
- name: Diff matching for multi files
run: |
chmod +x ./scripts/diff-match/for-multi.sh
./scripts/diff-match/for-multi.sh ${{ github.event.pull_request.base.ref }} ${{ github.event.pull_request.head.ref }}
env:
GH_TOKEN: ${{ github.token }}
- name: ID embedding
run: |
chmod +x ./scripts/id-embedding/index.sh
./scripts/id-embedding/index.sh
- name: Install ChromeDriver
uses: nanasess/setup-chromedriver@v2
- name: Start server
run: |
npm run dev &
echo $! > server.pid
sleep 30
- name: Run e2e tests
run: node --test
continue-on-error: true
- name: Stop server
run: kill $(cat server.pid)
# comment on PR with results
- name: List and display file contents
run: |
chmod +x ./scripts/suggest-repair/index.sh
./scripts/suggest-repair/index.sh
- name: Comment on PR
run: gh pr comment ${{ github.event.number }} --body-file comment.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}