Skip to content

LC-187: Fix failing Storybook tests in Data Table component #256

LC-187: Fix failing Storybook tests in Data Table component

LC-187: Fix failing Storybook tests in Data Table component #256

Workflow file for this run

name: Build and Deploy Component Library Docs
on:
push:
branches:
- master
pull_request:
env:
# Serve Docs runs an http server that cannot be shared across matrix machines, would be cool to figure that out
NX_CLOUD_DISTRIBUTED_EXECUTION: false
jobs:
cypress-docs:
runs-on: ubuntu-latest
strategy:
matrix:
machines: [1, 2, 3]
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install Deps
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- run: npx nx-cloud start-ci-run
- name: Run E2E Tests
uses: cypress-io/github-action@v2
timeout-minutes: 10
with:
record: true
parallel: true
start: npx nx serve-docs ui-components
project: packages/ui-components-e2e
command-prefix: 'percy exec --parallel -- npx'
wait-on: 'http://localhost:6007'
wait-on-timeout: 120
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_PARALLEL_TOTAL: 3
- name: Stop NX Agents
run: npx nx-cloud stop-all-agents
build-docs:
needs: cypress-docs
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
steps:
# Check out code
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- name: Build docs
run: yarn && npx nx-cloud start-ci-run
- run: npx nx build-docs ui-components
- run: npx nx-cloud stop-all-agents
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
# And make it available for the builds
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
file: deploy/Dockerfile
tags: lambdacurry/component-library-docs:${{ github.sha }}
- name: Helm Update
uses: WyriHaximus/github-action-helm3@v2
with:
exec: helm repo add lambdacurry https://charts.lambdacurry.dev --username lambdacurry --password ${{ secrets.LAMBDACURRY_CHART_PASSWORD }} && helm upgrade component-library-docs --reuse-values --set images.nginx.tag=${{ github.sha }} --set images.nginx.repository=lambdacurry/component-library-docs lambdacurry/static-site -n component-library
kubeconfig: '${{ secrets.EKS_KUBECONFIG }}'