Skip to content

Commit

Permalink
add test job
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaosen7 committed Jul 5, 2024
1 parent 58eea6d commit d475a14
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ on:
pull_request:
branches: ["main"]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2

- uses: actions/setup-node@v3
with:
node-version: 20
- name: Rush Install
run: node common/scripts/install-run-rush.js install
- name: Test
run: node common/scripts/install-run-rush-pnpm.js test -r

build:
runs-on: ubuntu-latest
steps:
Expand All @@ -14,9 +29,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
- name: Verify Change Logs
run: node common/scripts/install-run-rush.js change --verify
node-version: 20
- name: Rush Install
run: node common/scripts/install-run-rush.js install
- name: Rush rebuild
Expand Down
2 changes: 1 addition & 1 deletion apps/large-file-upload/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build:next": "next build",
"build:socket-server": "tsup socket-server.ts",
"lint": "next lint",
"test": "vitest"
"test": "vitest --run"
},
"dependencies": {
"@esbuild-plugins/tsconfig-paths": "^0.1.2",
Expand Down
2 changes: 2 additions & 0 deletions apps/stackoverflow/libs/mock/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ describe("mock", () => {
const tag = mock.tag();
expect(tag).toEqual({
id: expect.any(String),
creatorId: expect.any(String),
createdAt: expect.any(Date),
name: expect.any(String),
description: expect.any(String),
Expand Down Expand Up @@ -57,6 +58,7 @@ describe("mock", () => {
tags.forEach((tag) => {
expect(tag).toEqual({
id: expect.any(String),
creatorId: expect.any(String),
createdAt: expect.any(Date),
name: expect.any(String),
description: expect.any(String),
Expand Down
2 changes: 1 addition & 1 deletion apps/stackoverflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build:next": "next build",
"build:storybook": "storybook build",
"lint": "next lint",
"test": "vitest",
"test": "vitest --run",
"prisma:studio": "dotenv -e .env.development -- npx prisma studio -b false",
"prisma:sync:dev": "dotenv -e .env.development -- tsx .scripts/sync-prisma.ts",
"typecheck": "npx tsc --noEmit",
Expand Down

0 comments on commit d475a14

Please sign in to comment.