forked from DeviceFarmer/stf
-
Notifications
You must be signed in to change notification settings - Fork 30
51 lines (44 loc) · 1.36 KB
/
lint_lib.yaml
File metadata and controls
51 lines (44 loc) · 1.36 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
name: Checks for /lib directory
on:
pull_request:
branches:
- master
paths:
- lib/** # Запускать workflow при изменениях в директории /lib
jobs:
lint-lib:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Stylelint Check
run: npm run lint
if: always()
- name: Run typecheck and capture summary
id: typecheck
if: always()
run: |
set +e
(npm run typecheck || true) | tee typecheck.txt
echo "problems=$(cat typecheck.txt | grep "error TS" | wc -l)" >> $GITHUB_OUTPUT
set -e
# - name: Comment number of TS errors
# if: always()
# uses: actions/github-script@v7
# with:
# script: |
# const summary = `${{ steps.typecheck.outputs.problems }}`;
# if (summary) {
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: `Number of TypeScript errors: ${summary}`
# });
# }