74 lines
1.8 KiB
YAML
74 lines
1.8 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- develop
|
|
|
|
jobs:
|
|
lint:
|
|
name: 'lint'
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node: [16, 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: Run eslint
|
|
run: yarn run eslint
|
|
integration:
|
|
name: 'integration'
|
|
needs: [lint]
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node: [16, 18, 20]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'yarn'
|
|
- name: Install dependencies plugin
|
|
run: yarn --frozen-lockfile --unsafe-perm --production
|
|
- name: Install dependencies playground
|
|
run: yarn playground:install --frozen-lockfile --unsafe-perm
|
|
- name: Build playground
|
|
run: yarn playground:build
|
|
- name: Run test
|
|
run: yarn run -s test:integration
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v2
|
|
with:
|
|
token: ${{ secrets.CODECOV }}
|
|
flags: unit
|
|
verbose: true
|
|
fail_ci_if_error: true
|
|
# unit:
|
|
# name: 'unit'
|
|
# needs: [lint]
|
|
# runs-on: ubuntu-latest
|
|
# strategy:
|
|
# matrix:
|
|
# node: [16, 18, 20]
|
|
# steps:
|
|
# - uses: actions/checkout@v2
|
|
# - uses: actions/setup-node@v2
|
|
# with:
|
|
# node-version: ${{ matrix.node }}
|
|
# cache: 'yarn'
|
|
# - name: Install dependencies
|
|
# run: yarn --ignore-scripts --frozen-lockfile
|
|
# - name: Run test
|
|
# run: yarn run -s test:unit
|