Merge pull request #187 from pluginpal/feature/171-generate-cli-error #361
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: Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
- develop | |
jobs: | |
lint: | |
name: 'lint' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [18, 20] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
- name: Make build | |
run: yarn run build | |
- name: Run eslint | |
run: yarn run eslint | |
- name: Upload plugin build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: plugin-build | |
path: build | |
test: | |
name: 'test' | |
needs: [lint] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [18, 20] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'yarn' | |
- name: Download plugin build | |
uses: actions/download-artifact@v3 | |
with: | |
name: plugin-build | |
path: build | |
- name: Install plugin dependencies | |
run: yarn build:install | |
- name: Install playground dependencies | |
run: yarn playground:install --frozen-lockfile --unsafe-perm | |
- name: Install plugin into playground | |
run: yarn playground:install-plugin | |
- name: Install testing libraries | |
run: yarn test:install | |
- name: Build playground | |
run: NODE_ENV=ci yarn playground:build | |
- name: Run unit tests | |
run: NODE_ENV=ci yarn test:unit | |
- name: Run integration tests | |
run: NODE_ENV=ci yarn test:integration |