mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-01-20 16:30:34 +00:00
Merge pull request #4 from status-im/ra.add-storybook-ci-test
ci: add Storybook CI test action
This commit is contained in:
commit
0f67aea1bc
51
.github/workflows/ui-tests.yaml
vendored
Normal file
51
.github/workflows/ui-tests.yaml
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
name: 'UI tests'
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
cache-dependencies:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Commit
|
||||
uses: actions/checkout@v2
|
||||
- name: Cache yarn dependencies and cypress
|
||||
uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: |
|
||||
~/.cache/Cypress
|
||||
node_modules
|
||||
key: ${{ runner.os }}-yarn-v3-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-v3
|
||||
- name: Install dependencies if cache invalid
|
||||
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
||||
run: yarn
|
||||
|
||||
interaction-and-and-accessibility:
|
||||
runs-on: ubuntu-latest
|
||||
needs: cache-dependencies
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '18.x'
|
||||
- name: Restore yarn dependencies
|
||||
uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: |
|
||||
~/.cache/Cypress
|
||||
node_modules
|
||||
key: ${{ runner.os }}-yarn-v3-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-v3
|
||||
- name: Install Playwright
|
||||
run: npx playwright install --with-deps
|
||||
- name: Build Storybook
|
||||
run: yarn build-storybook --quiet
|
||||
- name: Serve Storybook and run tests
|
||||
run: |
|
||||
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
|
||||
"npx http-server storybook-static --port 6006 --silent" \
|
||||
"npx wait-on tcp:127.0.0.1:6006 && yarn test-storybook"
|
1
.github/workflows/ui-tests.yml
vendored
Normal file
1
.github/workflows/ui-tests.yml
vendored
Normal file
@ -0,0 +1 @@
|
||||
name: 'UI tests'
|
Loading…
x
Reference in New Issue
Block a user