mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-03 22:33:12 +02:00
bc8a044ab1
* run cypress on github action * add lint action * add test and coverage action * upgrade testing dependencies * upgrade linting dependencies * add bundlesize action * fix env name, prevent husky * add npm publish step * upgrade cypress to latest non-breaking version * fix postversion script * don't share full token with bundlesize * nicer version commit * add preversion script, use `--atomic` and don't publish tests * enforce tagged and signed version * restored bump-cache
42 lines
1 KiB
YAML
42 lines
1 KiB
YAML
name: Unit Tests
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'src/scripts/**'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
|
|
- name: Install dependencies
|
|
run: npm install --no-optional --no-audit --ignore-scripts
|
|
env:
|
|
CYPRESS_INSTALL_BINARY: 0
|
|
HUSKY_SKIP_INSTALL: true
|
|
|
|
- run: npm run coverage
|
|
env:
|
|
FORCE_COLOR: 2
|
|
|
|
- name: Upload coverage to Codecov
|
|
run: bash <(curl -s https://codecov.io/bash)
|
|
-f ./coverage/lcov.info
|
|
-B ${{ github.head_ref }}
|
|
-C ${{ github.event.after }}
|
|
-P ${{ github.event.number }}
|
|
-Z || echo 'Codecov upload failed'
|
|
env:
|
|
CI: true
|
|
GITLAB_CI: true # pretend we are GitLab CI, while Codecov adding support for Github Actions
|
|
CODECOV_ENV: github-action
|
|
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
|