update tests to test the template #1
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: Template Tests | |
on: [push] | |
jobs: | |
template-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Yarn cache path | |
id: yarn-cache | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Checkout branch | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
- name: Load Yarn cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Remove Postinstall Script | |
run: npm pkg set scripts.postinstall="echo no-postinstall" | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile | |
env: | |
CI: true | |
- name: Create component with template | |
run: yarn new:component --name ComponentName | |
- name: Check global types | |
run: | | |
yarn vue-tsc --noEmit -p . | |
yarn tsc --noEmit --project ./tsconfig.react.json | |
yarn vue-tsc --noEmit --project ./tsconfig.vue.json | |
- name: Lint all files | |
run: yarn eslint . | |
# run cypress component tests | |
- name: Cypress run CT | |
uses: cypress-io/github-action@v5 | |
with: | |
component: true | |
record: true | |
browser: chrome | |
spec: components/ComponentName/**/* | |
env: | |
# Recommended: pass the GitHub token lets this action correctly | |
# determine the unique run id necessary to re-run the checks | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} |