Skip to content

Commit 47b2612

Browse files
committed
fix: adjust lint-typescript for library usage
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent be62912 commit 47b2612

File tree

1 file changed

+10
-67
lines changed

1 file changed

+10
-67
lines changed
Lines changed: 10 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
6-
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
6+
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
77
# SPDX-License-Identifier: MIT
88

99
name: Type checking
1010

11-
on:
12-
pull_request:
13-
push:
14-
branches:
15-
- main
16-
- master
17-
- stable*
11+
on: pull_request
1812

1913
permissions:
2014
contents: read
@@ -24,77 +18,26 @@ concurrency:
2418
cancel-in-progress: true
2519

2620
jobs:
27-
changes:
28-
runs-on: ubuntu-latest-low
29-
permissions:
30-
contents: read
31-
pull-requests: read
32-
33-
outputs:
34-
src: ${{ steps.changes.outputs.src}}
35-
36-
steps:
37-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
38-
id: changes
39-
continue-on-error: true
40-
with:
41-
filters: |
42-
src:
43-
- '.github/workflows/lint-typescript.yml'
44-
- 'package.json'
45-
- 'package-lock.json'
46-
- 'tsconfig.json'
47-
- '**.ts'
48-
- '**.vue'
49-
50-
test:
21+
lint:
5122
runs-on: ubuntu-latest
5223

53-
needs: changes
54-
if: needs.changes.outputs.src != 'false'
24+
name: Type checking
5525

5626
steps:
5727
- name: Checkout
58-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59-
with:
60-
persist-credentials: false
61-
62-
- name: Read package.json node and npm engines version
63-
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
64-
id: versions
65-
with:
66-
fallbackNode: '^20'
67-
fallbackNpm: '^10'
28+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
6829

69-
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
70-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
30+
- name: Set up node
31+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
7132
with:
72-
node-version: ${{ steps.versions.outputs.nodeVersion }}
73-
74-
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
75-
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
33+
node-version-file: package.json
7634

7735
- name: Install dependencies
7836
env:
7937
CYPRESS_INSTALL_BINARY: 0
80-
run: |
81-
npm ci
38+
run: npm ci
8239

8340
- name: Check types
8441
run: |
8542
npm run --if-present check-types
8643
npm run --if-present ts:check
87-
88-
summary:
89-
permissions:
90-
contents: none
91-
runs-on: ubuntu-latest-low
92-
needs: [changes, test]
93-
94-
if: always()
95-
96-
name: typescript-summary
97-
98-
steps:
99-
- name: Summary status
100-
run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi

0 commit comments

Comments
 (0)