-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Other changes: * ci: Migrate to Github Actions * refactor: Use import type, which introduced in TS3.8 * doc: Remove CircleCI badges
- Loading branch information
Showing
119 changed files
with
1,222 additions
and
802 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
tags-ignore: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
tags-ignore: | ||
- '*' | ||
|
||
env: | ||
CI_SKIP: false | ||
|
||
jobs: | ||
test: | ||
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, 'doc:')" | ||
name: ${{ matrix.os }} ${{ matrix.target }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-18.04, windows-2019] | ||
target: [13.x] | ||
timeout-minutes: 120 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Git log | ||
shell: bash | ||
run: | | ||
if [ -n "$(git log --format=%B -n 1 | grep -iE '^[0-9]+[.]{1,}[0-9]+[.]{1,}[0-9]+')" ]; then | ||
echo '::set-env name=CI_SKIP::true' | ||
fi | ||
- name: Setup node@${{ matrix.target }} | ||
if: "env.CI_SKIP == 'false'" | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.target }} | ||
|
||
- name: List versions | ||
if: "env.CI_SKIP == 'false'" | ||
continue-on-error: true | ||
shell: bash | ||
run: | | ||
node -v && npm version && which npm && pwd && npx envinfo | ||
- name: Install dependencies | ||
if: "env.CI_SKIP == 'false'" | ||
run: | | ||
npm ci --quiet | ||
- name: Lint | ||
if: "env.CI_SKIP == 'false'" | ||
run: | | ||
npm run lint | ||
- name: Build | ||
if: "env.CI_SKIP == 'false'" | ||
run: | | ||
npm run build:test | ||
- name: Check build | ||
if: "env.CI_SKIP == 'false'" | ||
shell: bash | ||
run: | | ||
pwd && ls -la | ||
- name: Run Test | ||
if: "env.CI_SKIP == 'false'" | ||
run: | | ||
npm run jest | ||
- name: Upload coverage to codecov | ||
uses: codecov/codecov-action@v1 | ||
if: success() | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage/lcov.info | ||
flags: unit_tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: publish | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- '*' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.os }} ${{ matrix.target }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 120 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-18.04] | ||
target: [13.x] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup node@${{ matrix.target }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.target }} | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: List versions | ||
continue-on-error: true | ||
shell: bash | ||
run: | | ||
node -v && npm version && which npm && pwd && npx envinfo | ||
- name: Install dependencies | ||
run: | | ||
npm ci --quiet | ||
- name: Publish to npm (RC) | ||
if: contains(github.ref, '-rc') == true | ||
run: | | ||
npm config list | ||
npm publish . --tag=next | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Publish to npm | ||
if: contains(github.ref, '-rc') == false | ||
run: | | ||
npm config list | ||
npm publish . | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# See https://github.com/actions/setup-node/issues/73. | ||
# - name: Setup node@${{ matrix.target }} | ||
# uses: actions/setup-node@v1 | ||
# with: | ||
# node-version: ${{ matrix.target }} | ||
# registry-url: 'https://npm.pkg.github.com/' | ||
# scope: '@motss' | ||
|
||
# - name: Publish to GPR (RC) | ||
# if: success() && contains(github.ref, '-rc') == true | ||
# run: | | ||
# npm config list | ||
# npm publish . --tag=next | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{github.token}} | ||
|
||
# - name: Publish to GPR | ||
# if: success() && contains(github.ref, '-rc') == false | ||
# run: | | ||
# npm config list | ||
# npm publish . | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{github.token}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.