add storybook build to CI tests #8
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: Run unit tests and a test build | |
on: | |
push: | |
branches: | |
- '*' # matches every branch that doesn't contain a '/' | |
- '*/*' # matches every branch containing a single '/' | |
- '**' # matches every branch | |
- '!master' # excludes master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: '0' | |
# Setup .npmrc file to publish to GitHub Packages | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '12.x' | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@g-loot' | |
- run: npm ci | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_TOKEN }} | |
- run: npm run build | |
- run: npm run dev | |
- name: run unit tests | |
run: npm test |