diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..69eafff9 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,63 @@ +name: Test + +on: + pull_request: + types: [opened, synchronize] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + - name: Install and build + run: | + yarn install --frozen-lockfile + yarn build + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + - name: Test + if: success() + run: | + yarn test + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + - name: Install and build + run: | + yarn install --frozen-lockfile + yarn build + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + - name: Test + if: success() + run: | + yarn lint + + build-storybook-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + - name: Install and build + run: | + yarn install --frozen-lockfile + yarn build + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + - name: Test + if: success() + run: | + yarn build-storybook