Repository navigation
103 lines (73 loc) · 2.14 KB
/
Copy pathci.yml
File metadata and controls
103 lines (73 loc) · 2.14 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: CI
on:
push:
branches:
- dev
- main
- pro
pull_request:
permissions:
contents: read
jobs:
# =============================================================================
# Check: lint, unit and browser tests, build and test the packed package
# =============================================================================
check:
name: Check
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v7
-
name: Setup Node
uses: actions/setup-node@v7
with:
node-version: 22.x
cache: npm
-
name: NPM Install
run: npm clean-install
-
name: NPM Run Lint
run: npm run lint
-
name: NPM Run Test
run: npm test
-
name: Install Playwright browsers
run: npx playwright install --with-deps chromium firefox webkit
-
name: NPM Run Test Browser
run: npm run test:browser
-
name: NPM Run Build
run: npm run build
-
name: NPM Run Test Package
run: npm run test:package
# =============================================================================
# Auto-merge Dependabot PRs once the checks pass
# =============================================================================
dependabot:
name: Dependabot Auto-Merge
needs: check
if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
-
name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v3
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
-
name: Auto-merge changes from Dependabot
if: steps.metadata.outputs.update-type != 'version-update:semver-major' || steps.metadata.outputs.package-ecosystem == 'github_actions'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}