Skip to content

chore: Add CI for react components #12

chore: Add CI for react components

chore: Add CI for react components #12

name: React Components CI
on:
pull_request:
paths:
- "react-components/**"
branches:
- "**"
jobs:
react-components-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Cognite CICD Yarn
working-directory: react-components
run: |
echo "
npmScopes:
cognite:
npmAlwaysAuth: true
npmAuthToken: \"\${NPM_TOKEN}\"
npmRegistryServer: "https://registry.npmjs.org"
" >> .yarnrc.yml
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Install NPM dependencies
working-directory: react-components
run: yarn install --immutable
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Lint
working-directory: react-components
continue-on-error: false
run: yarn run lint
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Build components
working-directory: react-components
continue-on-error: false
run: yarn run build
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Build Storybook
working-directory: react-components
continue-on-error: false
run: yarn run build-storybook
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}