Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5a7c282
chore: add refs and use chinello/alpine-chrome:93
Anxhul10 Aug 4, 2025
e578ef9
chore: add Dockerfile
Anxhul10 Aug 4, 2025
6ba2c4b
chore: add entrypoint
Anxhul10 Aug 4, 2025
5234832
fix: docker image pass action
Anxhul10 Aug 4, 2025
4689464
fix: lint errors
Anxhul10 Aug 4, 2025
35c8515
chore: run node in docker
Anxhul10 Aug 4, 2025
4c8bb49
chore: checking loki test in docker action
Anxhul10 Aug 4, 2025
e6eaa0f
chore: docker action
Anxhul10 Aug 4, 2025
7337563
chore: use default docker image
Anxhul10 Aug 4, 2025
4ce06cb
chore: add root usr
Anxhul10 Aug 4, 2025
8ec6c90
chore: add yarn
Anxhul10 Aug 4, 2025
e7f2051
update
Anxhul10 Aug 4, 2025
8828dd4
chore: debug
Anxhul10 Aug 4, 2025
1ec0344
update
Anxhul10 Aug 4, 2025
88ca0df
update
Anxhul10 Aug 4, 2025
06c4bd7
chore: update:
Anxhul10 Aug 4, 2025
df4f080
test
Anxhul10 Aug 4, 2025
6486a2a
udpate
Anxhul10 Aug 4, 2025
a8f1811
chore: yarn version 1.22.19
Anxhul10 Aug 4, 2025
3cb92d4
chore: add ci cmd
Anxhul10 Aug 4, 2025
44e62dc
update
Anxhul10 Aug 4, 2025
873d93d
use origin docker image headless
Anxhul10 Aug 6, 2025
b0d0d8c
chore: revive docker test
Anxhul10 Aug 7, 2025
eee38e8
fix: yoga layout error
Anxhul10 Aug 7, 2025
38ba23a
fix: use correct docker image
Anxhul10 Aug 7, 2025
68ca1fc
chore: use 123 node
Anxhul10 Aug 7, 2025
344877e
update
Anxhul10 Aug 7, 2025
4faafcb
chore: update refs
Anxhul10 Aug 7, 2025
2da8f77
chore: remove chrome concurrency causes error and increases the CI time
Anxhul10 Aug 7, 2025
3437b6c
try: to fix fail test
Anxhul10 Aug 7, 2025
b2670c3
chore: full access to create folder
Anxhul10 Aug 7, 2025
d84bf8e
chore: non root user
Anxhul10 Aug 7, 2025
3254477
update
Anxhul10 Aug 7, 2025
fd7bbdb
update
Anxhul10 Aug 7, 2025
19c51fc
chore: reduce chrome concurrency
Anxhul10 Aug 7, 2025
ff1b3d4
fix: merge conflict
Anxhul10 Aug 7, 2025
8dab2d5
fix: staticServer.close is not a function on running chrome.app
Anxhul10 Aug 8, 2025
5fc1330
chore: update lockfile with loki/target-chrome-app patch
Anxhul10 Aug 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .github/actions/test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM zenika/alpine-chrome:with-node

USER root

COPY entrypoint.sh /entrypoint.sh

ENV CHROME_PATH=/usr/bin/chromium-browser

ENTRYPOINT ["/entrypoint.sh"]
23 changes: 11 additions & 12 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ inputs:
react_uri:
required: true
default: ./storybook-static
outputs:
fuselage:
description: A regex of fuselage components
fuselage-toastbar:
description: A regex of fuselage-toastbar components
layout:
description: A regex of layout components
onboarding-ui:
description: A regex of onboarding-ui components

# outputs:
# fuselage:
# description: A regex of fuselage components
# fuselage-toastbar:
# description: A regex of fuselage-toastbar components
# layout:
# description: A regex of layout components
# onboarding-ui:
# description: A regex of onboarding-ui components
runs:
using: 'node20'
main: dist/index.js
using: 'docker'
image: 'Dockerfile'
24 changes: 24 additions & 0 deletions .github/actions/test/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh -ex

# for pkg in packages/*/package.json; do
# cd "$(dirname $pkg)"
# mv package.json package.json-old
# cat package.json-old | sed s/\.docker/.app/ > package.json
# cd -
# done
# cd
# yarn run loki:test-ci --concurrency=1

# for pkg in packages/*/package.json; do
# cd "$(dirname $pkg)"
# mv package.json-old package.json
# cd -
# done

cd packages/fuselage
mv package.json package.json-old
cat package.json-old | sed s/\.docker/.app/ > package.json

yarn loki:test-ci

mv package.json-old package.json
147 changes: 74 additions & 73 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,76 +85,77 @@ jobs:
path: .turbo
key: turbo-${{ runner.os }}-${{ github.job }}
restore-keys: |
turbo-${{ runner.os }}-
- name: Build private action
run: yarn build
working-directory: ./.github/actions/test
- id: thruster_action
uses: ./.github/actions/test
- name: visual test for fuselage
if: always()
run: |
if [ "${{steps.thruster_action.outputs.fuselage }}" = "skip" ]; then
echo "skipping visual test for fuselage"
elif [ "${{steps.thruster_action.outputs.fuselage }}" = "full test" ]; then
yarn loki:test-ci
else
yarn loki test --chromeFlags='--headless --no-sandbox --disable-gpu --disable-features=VizDisplayCompositor' --requireReference --verboseRenderer --reactUri file:./storybook-static --storiesFilter="${{steps.thruster_action.outputs.fuselage }}"
fi
working-directory: packages/fuselage
- name: visual test for fuselage-toastbar
if: always()
run: |
if [ "${{steps.thruster_action.outputs.fuselage-toastbar }}" = "skip" ]; then
echo "skipping visual test for fuselage-toastbar "
elif [ "${{steps.thruster_action.outputs.fuselage-toastbar }}" = "full test" ]; then
yarn loki:test-ci
else
yarn loki test --chromeFlags='--headless --no-sandbox --disable-gpu --disable-features=VizDisplayCompositor' --requireReference --verboseRenderer --reactUri file:./storybook-static --storiesFilter="${{steps.thruster_action.outputs.fuselage-toastbar }}"
fi
working-directory: packages/fuselage-toastbar
- name: visual test for layout
if: always()
run: |
if [ "${{steps.thruster_action.outputs.layout }}" = "skip" ]; then
echo "skipping visual tests fro layout "
elif [ "${{steps.thruster_action.outputs.layout }}" = "full test" ]; then
yarn loki:test-ci
else
yarn loki test --chromeFlags='--headless --no-sandbox --disable-gpu --disable-features=VizDisplayCompositor' --requireReference --verboseRenderer --reactUri file:./storybook-static --storiesFilter="${{steps.thruster_action.outputs.layout }}"
fi
working-directory: packages/layout
- name: visual test for onboarding-ui
if: always()
run: |
if [ "${{steps.thruster_action.outputs.onboarding-ui }}" = "skip" ]; then
echo "skipping visual test for onboarding-ui "
elif [ "${{steps.thruster_action.outputs.onboarding-ui }}" = "full test" ]; then
yarn loki:test-ci
else
yarn loki test --chromeFlags='--headless --no-sandbox --disable-gpu --disable-features=VizDisplayCompositor' --requireReference --verboseRenderer --reactUri file:./storybook-static --storiesFilter="${{steps.thruster_action.outputs.onboarding-ui }}"
fi
working-directory: packages/onboarding-ui
- name: upload loki images
if: always()
uses: actions/upload-artifact@v4
with:
name: loki-${{ github.event.number }}
path: |
packages/fuselage/.loki/current
packages/fuselage/.loki/difference
packages/fuselage/.loki/reference
packages/fuselage-toastbar/.loki/current
packages/fuselage-toastbar/.loki/difference
packages/fuselage-toastbar/.loki/reference
packages/onboarding-ui/.loki/current
packages/onboarding-ui/.loki/difference
packages/onboarding-ui/.loki/reference
packages/layout/.loki/current
packages/layout/.loki/difference
packages/layout/.loki/reference
- name: download .loki
if: always()
uses: actions/download-artifact@v4
with:
name: loki-${{ github.event.number }}
turbo-${{ runner.os }}-
- uses: ./.github/actions/test
# - name: Build private action
# run: yarn build
# working-directory: ./.github/actions/test
# - id: thruster_action
# uses: ./.github/actions/test
# - name: visual test for fuselage
# if: always()
# run: |
# if [ "${{steps.thruster_action.outputs.fuselage }}" = "skip" ]; then
# echo "skipping visual test for fuselage"
# elif [ "${{steps.thruster_action.outputs.fuselage }}" = "full test" ]; then
# yarn loki:test-ci
# else
# yarn loki test --chromeFlags='--headless --no-sandbox --disable-gpu --disable-features=VizDisplayCompositor' --requireReference --verboseRenderer --reactUri file:./storybook-static --storiesFilter="${{steps.thruster_action.outputs.fuselage }}"
# fi
# working-directory: packages/fuselage
# - name: visual test for fuselage-toastbar
# if: always()
# run: |
# if [ "${{steps.thruster_action.outputs.fuselage-toastbar }}" = "skip" ]; then
# echo "skipping visual test for fuselage-toastbar "
# elif [ "${{steps.thruster_action.outputs.fuselage-toastbar }}" = "full test" ]; then
# yarn loki:test-ci
# else
# yarn loki test --chromeFlags='--headless --no-sandbox --disable-gpu --disable-features=VizDisplayCompositor' --requireReference --verboseRenderer --reactUri file:./storybook-static --storiesFilter="${{steps.thruster_action.outputs.fuselage-toastbar }}"
# fi
# working-directory: packages/fuselage-toastbar
# - name: visual test for layout
# if: always()
# run: |
# if [ "${{steps.thruster_action.outputs.layout }}" = "skip" ]; then
# echo "skipping visual tests fro layout "
# elif [ "${{steps.thruster_action.outputs.layout }}" = "full test" ]; then
# yarn loki:test-ci
# else
# yarn loki test --chromeFlags='--headless --no-sandbox --disable-gpu --disable-features=VizDisplayCompositor' --requireReference --verboseRenderer --reactUri file:./storybook-static --storiesFilter="${{steps.thruster_action.outputs.layout }}"
# fi
# working-directory: packages/layout
# - name: visual test for onboarding-ui
# if: always()
# run: |
# if [ "${{steps.thruster_action.outputs.onboarding-ui }}" = "skip" ]; then
# echo "skipping visual test for onboarding-ui "
# elif [ "${{steps.thruster_action.outputs.onboarding-ui }}" = "full test" ]; then
# yarn loki:test-ci
# else
# yarn loki test --chromeFlags='--headless --no-sandbox --disable-gpu --disable-features=VizDisplayCompositor' --requireReference --verboseRenderer --reactUri file:./storybook-static --storiesFilter="${{steps.thruster_action.outputs.onboarding-ui }}"
# fi
# working-directory: packages/onboarding-ui
# - name: upload loki images
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: loki-${{ github.event.number }}
# path: |
# packages/fuselage/.loki/current
# packages/fuselage/.loki/difference
# packages/fuselage/.loki/reference
# packages/fuselage-toastbar/.loki/current
# packages/fuselage-toastbar/.loki/difference
# packages/fuselage-toastbar/.loki/reference
# packages/onboarding-ui/.loki/current
# packages/onboarding-ui/.loki/difference
# packages/onboarding-ui/.loki/reference
# packages/layout/.loki/current
# packages/layout/.loki/difference
# packages/layout/.loki/reference
# - name: download .loki
# if: always()
# uses: actions/download-artifact@v4
# with:
# name: loki-${{ github.event.number }}
14 changes: 14 additions & 0 deletions .yarn/patches/@loki-target-chrome-app-npm-0.35.0-b92d860c00.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/src/create-chrome-app-target.js b/src/create-chrome-app-target.js
index d87adea85023016f43bf5055906d50b2b97deaf4..bd6512d59f039e8689920d66f744c5e68d86f984 100644
--- a/src/create-chrome-app-target.js
+++ b/src/create-chrome-app-target.js
@@ -56,8 +56,7 @@ function createChromeAppTarget({

async function start(options = {}) {
if (useStaticServer && isLocalFile) {
- staticServer = createStaticServer(staticServerPath);
- staticServer.listen(staticServerPort);
+ staticServer = createStaticServer(staticServerPath).listen(staticServerPort);
debug(`Starting static file server at ${chromeUrl}`);
}
const launchOptions = Object.assign(
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"resolutions": {
"@loki/browser@npm:^0.35.0": "patch:@loki/browser@npm%3A0.35.0#~/.yarn/patches/@loki-browser-npm-0.35.0-56c1d62186.patch",
"@loki/target-chrome-docker@npm:^0.35.0": "patch:@loki/target-chrome-docker@npm%3A0.35.0#~/.yarn/patches/@loki-target-chrome-docker-npm-0.35.0-e5bcaa6a12.patch",
"@loki/core@npm:^0.35.0": "patch:@loki/core@npm%3A0.35.0#~/.yarn/patches/@loki-core-npm-0.35.0-2f7ae66155.patch"
"@loki/core@npm:^0.35.0": "patch:@loki/core@npm%3A0.35.0#~/.yarn/patches/@loki-core-npm-0.35.0-2f7ae66155.patch",
"@loki/target-chrome-app@npm:^0.35.0": "patch:@loki/target-chrome-app@npm%3A0.35.0#~/.yarn/patches/@loki-target-chrome-app-npm-0.35.0-b92d860c00.patch"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/fuselage-toastbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"resolve": "resolve-loki",
".:update-storybook:build-storybook": "run-s build-storybook",
".:update-storybook:purge-refs": "rimraf .loki/reference",
".:update-storybook:loki-update": "loki update --chromeFlags='--headless --no-sandbox --disable-gpu --disable-features=VizDisplayCompositor' --verboseRenderer --requireReference --reactUri file:./storybook-static",
".:update-storybook:loki-update": "loki update --chromeDockerImage=chinello/alpine-chrome:93 --chromeFlags='--headless --no-sandbox --disable-gpu --disable-features=VizDisplayCompositor' --verboseRenderer --requireReference --reactUri file:./storybook-static",
"prettier-format": "prettier 'src/**/*.{ts,tsx,js,jsx}' --write",
"loki:test-ci": "loki test --chromeFlags='--headless --no-sandbox --disable-gpu --disable-features=VizDisplayCompositor' --requireReference --verboseRenderer --reactUri file:./storybook-static"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 packages/fuselage/.loki/reference/desktop_Feedback_Callout_Info.png
Binary file modified packages/fuselage/.loki/reference/desktop_Feedback_States_Link.png
Binary file modified packages/fuselage/.loki/reference/desktop_Inputs_Button_As_Link.png
Binary file modified packages/fuselage/.loki/reference/desktop_Inputs_Button_Default.png
Binary file modified packages/fuselage/.loki/reference/desktop_Inputs_Button_Sizes.png
Binary file modified packages/fuselage/.loki/reference/desktop_Inputs_InputBox_Date.png
Binary file modified packages/fuselage/.loki/reference/desktop_Inputs_InputBox_Time.png
Binary file modified packages/fuselage/.loki/reference/desktop_Inputs_Label_Default.png
Binary file modified packages/fuselage/.loki/reference/desktop_Inputs_Label_Info.png
Binary file modified packages/fuselage/.loki/reference/desktop_Inputs_Select_Default.png
Binary file modified packages/fuselage/.loki/reference/desktop_Inputs_Select_Error.png
Binary file modified packages/fuselage/.loki/reference/desktop_Inputs_Select_States.png
Loading
Loading