This repository was archived by the owner on Jun 29, 2022. It is now read-only.
forked from import-js/eslint-import-resolver-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (63 loc) · 1.82 KB
/
nodejs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Node CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
node: [8.x, 10.x, 12.x]
os: [macOS-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: setup yarn
run: |
curl -o- -L https://yarnpkg.com/install.sh | bash
export PATH="$HOME/.yarn/bin:$PATH"
- name: build, lint, test
run: |
yarn --frozen-lockfile
yarn build
yarn lint
yarn eslint -f friendly tests/**/*.{ts,tsx}
env:
CI: true
EFF_NO_LINK_RULES: true
# codecov:
# runs-on: macOS-latest
# needs: build
# steps:
# - name: Report Test Code Coverage
# if: matrix.node == '12.x'
# run: |
# yarn global add codecov codacy-coverage
# codecov
# cat ./coverage/lcov.info | codacy-coverage
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
deploy:
runs-on: macOS-latest
needs: build
steps:
- name: Publish Release and npm Package
if: github.event_name == 'push' && github.ref == 'master' && matrix.node == '12.x'
run: bash deploy.sh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_BRANCH: ${{ github.ref }}
GH_REPO: ${{ github.repository }}
codecheck:
runs-on: macOS-latest
needs: [build, deploy]
steps:
- name: Code Check
if: matrix.node == '12.x'
run: |
yarn add -D @codechecks/client @codechecks/build-size-watcher
yarn codechecks
env:
CC_SECRET: ${{ secrets.CC_SECRET }}