You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
LICENSE_KEY: ${{ secrets.MAXMIND_KEY }}
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
steps:
|
|
|
|
- name: Check out
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Set up Node
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 14.x
|
|
|
|
- name: Create .npmrc
|
|
|
|
run: 'echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > .npmrc'
|
|
|
|
- name: Install
|
|
|
|
run: yarn
|
|
|
|
- name: Build
|
|
|
|
run: yarn build
|
|
|
|
- name: Lint
|
|
|
|
run: yarn lint
|
|
|
|
- name: Unit Test
|
|
|
|
run: yarn jest --runInBand
|
|
|
|
- name: Report Coverage
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
file: ./.coverage/lcov.info
|
|
|
|
name: codecov
|
|
|
|
- name: Publish
|
|
|
|
if: ${{ github.event_name == 'push' }}
|
|
|
|
run: node build/publish.js
|