chore: Add CI for react components #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: React Components CI | |
on: | |
pull_request: | |
paths: | |
- "react-components/**" | |
branches: | |
- "**" | |
jobs: | |
install-dependencies: | |
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 }} |