Skip to content

Commit 6651a5d

Browse files
committed
ci: enable more workflows
1 parent e6cf851 commit 6651a5d

File tree

8 files changed

+132
-53
lines changed

8 files changed

+132
-53
lines changed

.github/workflows/autofix.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: autofix.ci # For security reasons, the workflow in which the autofix.ci action is used must be named "autofix.ci".
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
autofix:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
21+
- name: Setup Node.js LTS
22+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
23+
with:
24+
node-version: lts/*
25+
cache: yarn
26+
27+
- name: Install dependencies
28+
run: yarn --immutable
29+
30+
- name: Format Codes
31+
run: yarn format
32+
33+
- name: Apply autofix.ci
34+
uses: autofix-ci/action@2891949f3779a1cafafae1523058501de3d4e944 # v1
35+
with:
36+
fail-fast: false

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
runs-on: ${{ matrix.os }}
2525
steps:
2626
- name: Checkout Repo
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2828

2929
- name: Setup Node.js ${{ matrix.node }}
30-
uses: actions/setup-node@v4
30+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3131
with:
3232
node-version: ${{ matrix.node }}
3333
cache: yarn
@@ -39,7 +39,7 @@ jobs:
3939
if: matrix.node != 14
4040
run: yarn build
4141

42-
- name: Build Test
42+
- name: Test
4343
run: yarn test
4444

4545
- name: Lint
@@ -50,4 +50,6 @@ jobs:
5050
PARSER_NO_WATCH: true
5151

5252
- name: Codecov
53-
uses: codecov/codecov-action@v3
53+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
54+
with:
55+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/codeql.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/pkg-pr-new.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Any Commit
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout Repo
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
19+
- name: Setup Node.js LTS
20+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
21+
with:
22+
node-version: lts/*
23+
cache: yarn
24+
25+
- name: Install dependencies
26+
run: yarn --immutable
27+
28+
- name: Build
29+
run: yarn build
30+
31+
- name: Publish
32+
run: yarn dlx pkg-pr-new publish --compact

.github/workflows/pkg-size.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Package Size Report
2+
3+
on:
4+
- pull_request
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
pkg-size-report:
12+
name: Package Size Report
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
19+
- name: Package Size Report
20+
uses: pkg-size/action@a637fb0897b6f14f18e776d8c3dbccb34a1ad27b # v1.1.1
21+
continue-on-error: true
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,28 @@ on:
55
branches:
66
- master
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: write
14+
id-token: write
15+
pull-requests: write
16+
817
jobs:
918
release:
1019
name: Release
1120
runs-on: ubuntu-latest
1221
steps:
1322
- name: Checkout Repo
14-
uses: actions/checkout@v4
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1524
with:
1625
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
1726
fetch-depth: 0
1827

1928
- name: Setup Node.js LTS
20-
uses: actions/setup-node@v4
29+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2130
with:
2231
node-version: lts/*
2332
cache: yarn
@@ -36,4 +45,5 @@ jobs:
3645
publish: yarn release
3746
env:
3847
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
NPM_CONFIG_PROVENANCE: true
3949
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/size-limit.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,26 @@ on:
55
branches:
66
- master
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
size-limit:
1014
runs-on: ubuntu-latest
1115
steps:
12-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1317

1418
- name: Setup Node.js LTS
15-
uses: actions/setup-node@v4
19+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
1620
with:
1721
node-version: lts/*
1822
cache: yarn
1923

2024
- name: Install Dependencies
2125
run: yarn --immutable
2226

23-
- uses: andresz1/size-limit-action@v1
27+
- uses: andresz1/size-limit-action@94bc357df29c36c8f8d50ea497c3e225c3c95d1d # v1.8.0.8.0
2428
with:
2529
github_token: ${{ secrets.GITHUB_TOKEN }}
2630
skip_step: install

patches/ts-jest+29.3.4.patch

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/node_modules/ts-jest/dist/transpilers/typescript/transpile-module.js b/node_modules/ts-jest/dist/transpilers/typescript/transpile-module.js
2+
index e539389..6dbfb54 100644
3+
--- a/node_modules/ts-jest/dist/transpilers/typescript/transpile-module.js
4+
+++ b/node_modules/ts-jest/dist/transpilers/typescript/transpile-module.js
5+
@@ -54,9 +54,9 @@ const shouldCheckProjectPkgJsonContent = (fileName, moduleKind) => {
6+
* - Allow using custom AST transformers with the internal created {@link Program}
7+
*/
8+
const transpileWorker = (input, transpileOptions) => {
9+
- barebonesLibSourceFile ??= typescript_1.default.createSourceFile(barebonesLibName, barebonesLibContent, {
10+
+ ;(barebonesLibSourceFile == null ? (barebonesLibSourceFile = typescript_1.default.createSourceFile(barebonesLibName, barebonesLibContent, {
11+
languageVersion: typescript_1.default.ScriptTarget.Latest,
12+
- });
13+
+ })): barebonesLibSourceFile);
14+
const diagnostics = [];
15+
const options = transpileOptions.compilerOptions
16+
? // @ts-expect-error internal TypeScript API

0 commit comments

Comments
 (0)