diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44cf39e..c0b05a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,5 +52,5 @@ jobs: run: npm ci - name: Storybook visual tests - run: npm run docker:compose:test + run: npm run docker:compose:test:github diff --git a/docker-compose.yml b/docker-compose.yml index 2f94bf3..bebaf59 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,4 +37,16 @@ services: condition: service_healthy command: > sh -c "npm run test:storybook -- --updateSnapshot --url http://storybook:6006/" - + test-storybook-github: + image: velo.gl-test-storybook + build: ./config/test-storybook + volumes: + - ".:/app:rw" + #- "./__snapshots__:/app/__snapshots__:rw" + working_dir: /app + user: root + depends_on: + storybook: + condition: service_healthy + command: > + sh -c "npm run test:storybook -- --ci --url http://storybook:6006/" diff --git a/package.json b/package.json index 9bbb608..aaadb90 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ "docker:storybook": "npm run docker -- npm run storybook -- --no-open", "docker:compose:storybook": "docker-compose up --build storybook", "docker:compose:test": "docker-compose up --build test-storybook", + "docker:compose:test:github": "docker-compose up --build test-storybook-github", "docker:compose:test:update": "docker-compose up --build test-storybook-update", "lint:typecheck": "tsc --project tsconfig.lint.json --noEmit", "lint": "npm run lint:typecheck && eslint \"**\"",