Skip to content

docs: Update README.md #138

docs: Update README.md

docs: Update README.md #138

Workflow file for this run

name: Test and deploy
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-test:
runs-on: ubuntu-20.04
container: cypress/included:cypress-13.4.0-node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1
env:
CYPRESS_CACHE_FOLDER: ../cypress_cache
NODE_OPTIONS: --max-old-space-size=4096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI: true
WIREIT_LOGGER: "simple"
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
check-latest: true
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- uses: google/wireit@setup-github-actions-caching/v1
- name: Install
run: |
mkdir -p ../cypress_cache && \
npm run setup && \
chmod -R 777 ../cypress_cache && \
npx cross-env HOME=/root npx playwright install chromium firefox webkit --with-deps && \
chmod -R 777 /root/.cache/ms-playwright && \
apt install -y curl
- name: Types and linter check
run: npm run test:lint
- name: Unit tests
run: npm run test:unit -- --coverage --coverageReporters="lcov"
- name: Run codacy-coverage-reporter
uses: codacy/[email protected]
continue-on-error: true
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov.info
- name: E2E tests builded version
run: npm run test:e2e
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress
path: cypress
- name: E2E tests dev version
run: npm run test:e2e:dev
- name: Storybook tests
run: npx cross-env HOME=/root npm run test:storybook-ci
deploy-storybook:
needs: build-test
runs-on: ubuntu-20.04
if: github.ref_name == 'master'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install
run: npm run setup
- name: Build storybook
run: npm run build-storybook
- name: Deploy storybook
uses: peaceiris/actions-gh-pages@v3
if: github.ref_name == 'master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
# publish:
# needs: build-test
# runs-on: ubuntu-20.04
# if: github.ref_name == 'master'
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version-file: '.nvmrc'
# cache: 'npm'
# registry-url: 'https://registry.npmjs.org'
# - name: Install
# run: npm run setup
# - run: npm run build
# - uses: JS-DevTools/npm-publish@v3
# with:
# token: ${{ secrets.NPM_TOKEN }}
# provenance: true
# registry: 'https://registry.npmjs.org'