-
Notifications
You must be signed in to change notification settings - Fork 104
47 lines (42 loc) · 1.19 KB
/
test.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
name: Test
env:
CI: true
DEBUG: pw:api
on:
push:
jobs:
run:
strategy:
matrix:
node: ['20', '22.5.1']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: npm ci
run: npm ci
- name: run lint
run: npm run lint
- name: install Playwright
run: npx playwright install --with-deps > /dev/null
- name: run features
run: npm run test
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-result-report-${{ matrix.node }}
path: reports/report.html
dependabot:
name: 'Dependabot'
needs: [run]
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} # Detect that the PR author is dependabot
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL" # Use Github CLI to merge automatically the PR
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}