Skip to content

Commit 76888a1

Browse files
authored
Merge pull request #1554 from thunderstore-io/ci-improvements
Improve the coverage of CI pipeline
2 parents 34730b0 + 1fd3d3c commit 76888a1

File tree

4 files changed

+64
-24
lines changed

4 files changed

+64
-24
lines changed

.github/workflows/test.yml

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ jobs:
2929
name: Run pre-commit
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3333
with:
3434
submodules: false
3535
- name: Setup Python 3.8
3636
id: setup-python
3737
uses: actions/setup-python@v2
3838
with:
3939
python-version: "3.8"
40-
- uses: actions/setup-node@v2
40+
- uses: actions/setup-node@v4
4141
with:
4242
node-version: "20"
4343
- name: Get node version
@@ -99,35 +99,66 @@ jobs:
9999
VITE_AUTH_RETURN_URL: ${{ vars.NEXT_PUBLIC_SITE_URL }}
100100
steps:
101101
- uses: actions/checkout@v4
102-
- name: Set up Node ${{ needs.get-node-version.outputs.node-version }}
103-
uses: actions/setup-node@v3
102+
- name: Set up Node 24
103+
uses: actions/setup-node@v4
104104
with:
105-
node-version: ${{ needs.get-node-version.outputs.node-version }}
105+
node-version: "24"
106106
cache: "yarn"
107107
- name: Set fontawesome token
108108
run: |
109109
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
110110
npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.NPM_FA_TOKEN }}
111111
- name: Install Yarn dependencies
112112
run: yarn install --frozen-lockfile
113+
- name: Build @thunderstore/beta-switch
114+
run: yarn workspace @thunderstore/beta-switch build
113115
- name: Build @thunderstore/cyberstorm
114116
run: yarn workspace @thunderstore/cyberstorm build
117+
- name: Build @thunderstore/cyberstorm-forms
118+
run: yarn workspace @thunderstore/cyberstorm-forms build
119+
- name: Build and test @thunderstore/cyberstorm-remix
120+
run: |
121+
yarn workspace @thunderstore/cyberstorm-remix build
122+
yarn workspace @thunderstore/cyberstorm-remix test run
123+
# Enable once build process has been fixed.
124+
# - name: Build @thunderstore/cyberstorm-storybook
125+
# run: yarn workspace @thunderstore/cyberstorm-storybook build
115126
- name: Build @thunderstore/dapper
116127
run: yarn workspace @thunderstore/dapper build
117128
- name: Build @thunderstore/dapper-fake
118129
run: yarn workspace @thunderstore/dapper-fake build
119-
- name: Build @thunderstore/thunderstore-api
120-
run: yarn workspace @thunderstore/thunderstore-api build
121-
- name: Test @thunderstore/thunderstore-api
122-
run: yarn workspace @thunderstore/thunderstore-api test
123-
- name: Build @thunderstore/dapper-ts
124-
run: yarn workspace @thunderstore/dapper-ts build
125-
- name: Test @thunderstore/dapper-ts
126-
run: yarn workspace @thunderstore/dapper-ts test
130+
- name: Build and test @thunderstore/dapper-ts
131+
run: |
132+
yarn workspace @thunderstore/dapper-ts build
133+
yarn workspace @thunderstore/dapper-ts test
134+
- name: Build and test @thunderstore/graph-system
135+
run: |
136+
yarn workspace @thunderstore/graph-system build
137+
yarn workspace @thunderstore/graph-system test run
138+
- name: Build @thunderstore/react-dnd
139+
run: yarn workspace @thunderstore/react-dnd build
140+
- name: Build and test @thunderstore/thunderstore-api
141+
run: |
142+
yarn workspace @thunderstore/thunderstore-api build
143+
yarn workspace @thunderstore/thunderstore-api test
144+
- name: Build @thunderstore/ts-api-react
145+
run: yarn workspace @thunderstore/ts-api-react build
146+
- name: Build @thunderstore/ts-api-react-actions
147+
run: yarn workspace @thunderstore/ts-api-react-actions build
148+
- name: Build @thunderstore/ts-api-react-forms
149+
run: yarn workspace @thunderstore/ts-api-react-forms build
150+
- name: Build and test @thunderstore/ts-uploader
151+
# Add running tests once they've been fixed.
152+
run: |
153+
yarn workspace @thunderstore/ts-uploader build
154+
- name: Build @thunderstore/ts-uploader-react
155+
run: yarn workspace @thunderstore/ts-uploader-react build
156+
- name: Build and test @thunderstore/typed-event-emitter
157+
run: |
158+
yarn workspace @thunderstore/typed-event-emitter build
159+
yarn workspace @thunderstore/typed-event-emitter test
127160
- name: Build @thunderstore/use-promise
128161
run: yarn workspace @thunderstore/use-promise build
129-
- name: Build @thunderstore/cyberstorm-remix
130-
run: yarn workspace @thunderstore/cyberstorm-remix build
131162

132163
chromatic-deployment:
133164
runs-on: ubuntu-latest
@@ -142,7 +173,7 @@ jobs:
142173
with:
143174
fetch-depth: 0
144175
- name: Set up Node ${{ needs.get-node-version.outputs.node-version }}
145-
uses: actions/setup-node@v3
176+
uses: actions/setup-node@v4
146177
with:
147178
node-version: ${{ needs.get-node-version.outputs.node-version }}
148179
cache: "yarn"

packages/ts-api-react-forms/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
{
2828
"name": "typescript-plugin-css-modules"
2929
}
30-
],
31-
"types": ["react/next"]
30+
]
3231
},
3332
"include": ["./src/**/*.tsx", "./src/**/*.ts"],
3433
"exclude": ["node_modules"]

packages/ts-uploader-react/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
4-
"module": "ES2020",
3+
"target": "ESNext",
4+
"module": "ESNext",
55
"skipLibCheck": true,
66
"moduleResolution": "node",
77
"removeComments": true,

packages/ts-uploader/src/workers/__tests__/MD5WorkerManager.test.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,22 @@ import { MD5WorkerManager } from "../MD5WorkerManager";
33

44
describe("MD5WorkerManager", () => {
55
let manager: MD5WorkerManager;
6-
const mockWorker: Worker = {
7-
onmessage: null,
8-
// @ts-expect-error Mocking Worker methods
6+
7+
const mockWorker = {
8+
// event target bits that Worker requires
9+
addEventListener: vi.fn(),
10+
removeEventListener: vi.fn(),
11+
dispatchEvent: vi.fn(),
12+
13+
// handler properties
14+
onmessage: null as Worker["onmessage"],
15+
onerror: null as Worker["onerror"],
16+
onmessageerror: null as Worker["onmessageerror"],
17+
18+
// the methods you actually use
919
postMessage: vi.fn(),
1020
terminate: vi.fn(),
11-
};
21+
} satisfies Partial<Worker> as Worker;
1222

1323
beforeEach(() => {
1424
// Mock Worker

0 commit comments

Comments
 (0)