Skip to content

Commit

Permalink
Merge pull request #7842 from LedgerHQ/fix/test-ds-workflow
Browse files Browse the repository at this point in the history
CI - fix Test Design System / Design System Tests workflow
  • Loading branch information
themooneer authored Sep 23, 2024
2 parents 672875f + b884689 commit 2742dda
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-socks-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/ui": minor
---

Fixed e2e testing and next build issues on ci workflows
2 changes: 1 addition & 1 deletion .github/workflows/test-design-system-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: pnpm i --filter="./libs/ui/**"
- name: Build and Test affected libraries
id: test-ui
run: pnpm run test --continue --filter="./libs/ui/*" --filter="!./apps/ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
run: pnpm run test --continue --filter="./libs/ui/**" --filter="!./apps/ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
shell: bash
- name: (On Failure) Upload react-ui test results
uses: actions/upload-artifact@v4
Expand Down
8 changes: 5 additions & 3 deletions libs/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
"@ledgerhq/ui-shared": "workspace:^",
"@playwright/test": "~1.40.0",
"concurrently": "^8.0.0",
"cross-env": "^7.0.3",
"json": "^11.0.0",
"lint-staged": "^14.0.0"
},
"scripts": {
"pretest:react": "playwright install",
"test:react": "node tests/react.script webpack.js && node tests/react.script next.js",
"pretest:react:update-snapshots": "playwright install",
"test:react:update-snapshots": "env UPDATE_SNAPSHOTS=1 node tests/react.script webpack.js && env UPDATE_SNAPSHOTS=1 node tests/react.script next.js"
"clean": "pnpm -F ./examples/webpack.js -F ./examples/next.js clean:full",
"build-and-test": "pnpm pretest:react && pnpm build-next && pnpm e2e",
"build-next": "pnpm -w -F ./examples/webpack.js build",
"e2e": "cross-env UPDATE_SNAPSHOTS=1 pnpm concurrently -s=first -k \"pnpm -w -F ./examples/webpack.js serve\" \"playwright test $([ \"$UPDATE_SNAPSHOTS\" = 1 ] && echo \"--update-snapshots\")\""
}
}
2 changes: 1 addition & 1 deletion libs/ui/packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"lint:fix": "pnpm lint --fix",
"lint:css": "stylelint './src/**/*.{js,jsx,ts,tsx}' --fix",
"typecheck": "tsc --p . --noEmit",
"test": "pnpm -w -F ui test:react",
"test": "pnpm -w -F ui build-and-test",
"unimported": "unimported"
},
"dependencies": {
Expand Down
Binary file modified libs/ui/tests/react.spec.js-snapshots/dark-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified libs/ui/tests/react.spec.js-snapshots/light-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2742dda

Please sign in to comment.