|
|
|
name: PR Checks
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '12.x'
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Install
|
|
|
|
run: npm install
|
|
|
|
- name: Test
|
|
|
|
run: npm run test
|
|
|
|
- uses: codecov/codecov-action@v2
|
|
|
|
with:
|
|
|
|
files: coverage/*.json
|
|
|
|
flags: unittests
|
|
|
|
name: react-carousel-codecov
|
|
|
|
fail_ci_if_error: true
|
|
|
|
verbose: true
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '12.x'
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Install
|
|
|
|
run: npm install
|
|
|
|
- name: Lint
|
|
|
|
run: npm run lint
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '12.x'
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Install
|
|
|
|
run: npm install
|
|
|
|
- name: Build
|
|
|
|
run: npm run build
|