-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
39 lines (36 loc) · 1.09 KB
/
tester.yml
File metadata and controls
39 lines (36 loc) · 1.09 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
name: Tester
on: pull_request_target
permissions:
contents: read
jobs:
tester:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Use Node.js
uses: actions/setup-node@v6
- name: Install Dependencies
run: npm install
- name: Lint
run: npm run eslint
- name: Test
run: npm run build
env:
CI: true
- name: Comment PR
uses: marocchino/sticky-pull-request-comment@v3
with:
path: public/validate_theme.txt
- uses: actions/github-script@v9
with:
script: |
const fs = require('fs');
const fileContent = fs.readFileSync('public/validate_theme.txt', 'utf8');
if (fileContent.includes('❌')) {
core.setFailed('Validation failed!')
}