Skip to content

Commit

Permalink
update tests for npm and pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
ethriel3695 committed May 22, 2024
1 parent 0656726 commit dba4228
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
keys:
- v4-dependencies-{{ checksum "yarn.lock" }}
- v4-dependencies-
- run: corepack enable
- run: yarn set version berry
- run: yarn install

Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/smoke-test-npx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: corepack enable
- run: yarn set version berry
- name: install
run: yarn && git status --porcelain
- run: yarn build
run: npm install && git status --porcelain
- run: npm run build
- name: run chromatic
run: npx -p . chromatic --build-script-name build-test-storybook --exit-zero-on-changes --force-rebuild
env:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/smoke-test-pnpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Smoke test via pnpm
on: push

permissions:
contents: read

jobs:
chromatic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: lts/*
- name: install
run: pnpm install && git status --porcelain
- run: pnpm build
- name: run chromatic
run: pnpm dlx chromatic --build-script-name build-test-storybook --exit-zero-on-changes --force-rebuild
env:
LOG_LEVEL: debug
DEBUG: chromatic-cli
CHROMATIC_PROJECT_TOKEN: ${{ secrets.SMOKE_TESTS_CHROMATIC_PROJECT_TOKEN }}
3 changes: 1 addition & 2 deletions bin-src/trace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ describe('Test trace script from package.json', () => {

// Execute the script as a child process
const output = execSync(`yarn ${scriptName}`).toString().trim();
console.log(output);


const expandedStoryModule = `node-src/ui/messages/errors/invalidReportPath.stories.ts`;
const expandedFileModule = `node-src/ui/messages/errors/invalidReportPath.ts`;

Expand Down
2 changes: 2 additions & 0 deletions node-src/tasks/initialize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ describe('setRuntimeMetadata', () => {
} as any;
await setRuntimeMetadata(ctx);

console.log(ctx.runtimeMetadata);

expect(ctx.runtimeMetadata).toEqual({
nodePlatform: expect.stringMatching(/darwin|linux|win32/),
nodeVersion: process.versions.node,
Expand Down

0 comments on commit dba4228

Please sign in to comment.