Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 62 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,79 @@ name: CI

on: [push]

env:
NODE_VERSION: 12.x

jobs:
build:
install:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
- name: CI
uses: actions/checkout@v2
- name: Use Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: install dependencies
run: |
yarn
- name: run lint
run: |
yarn lint
- name: run tests
run: |
yarn test --watchAll=false --coverage --reporters=default
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile
env:
CI: true

lint:
runs-on: ubuntu-latest
needs: [install]

steps:
- name: Running lint
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Lint
run: yarn lint
env:
CI: true

test:
runs-on: ubuntu-latest
needs: [install]

steps:
- name: Running tests
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Test
run: yarn test --coverage --reporters=default
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: build
run: |
yarn build
env:
CI: true

- name: semantic release
build:
runs-on: ubuntu-latest
needs: [install]

steps:
- name: Build
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Build
run: yarn build
- name: Release
uses: cycjimmy/semantic-release-action@v2
id: semantic
with:
Expand Down