-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
20 additions
and
89 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 |
---|---|---|
@@ -1,54 +1,36 @@ | ||
|
||
name: CI | ||
|
||
on: [ push ] | ||
on: | ||
push: | ||
|
||
env: | ||
CI: true | ||
node-version: 16 | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
name: Node.js ${{ env.node_version }} | ||
with: | ||
node-version: ${{ env.node_version }} | ||
- run: npm install | ||
- run: npm run lint | ||
uses: NicTool/.github/.github/workflows/lint.yml@master | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Node.js ${{ env.node_version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
- run: npm install | ||
- run: npx -y c8 --reporter=lcovonly npm run test | ||
env: | ||
NODE_ENV: cov | ||
|
||
- uses: codecov/codecov-action@v2 | ||
- uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
uses: NicTool/.github/.github/workflows/coverage.yml@master | ||
secrets: inherit | ||
|
||
test: | ||
needs: lint | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
os: [ ubuntu-latest, windows-latest, macos-latest ] | ||
node-version: [ 14, 16, 18 ] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
name: Node.js ${{ matrix.node-version }} on ${{ matrix.os }} | ||
name: Node ${{ matrix.node-version }} on ${{ matrix.os }} | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- run: npm install | ||
- run: npm run test | ||
|
||
- run: npm test |
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
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 |
---|---|---|
@@ -1,50 +1,16 @@ | ||
|
||
name: publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- package.json | ||
|
||
env: | ||
CI: true | ||
node_version: 14 | ||
|
||
jobs: | ||
|
||
publish-npm: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup node.js ${{ env.node_version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- run: npm install | ||
|
||
- run: npm run test | ||
|
||
- run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
|
||
- name: GitHub Release | ||
uses: justincy/github-action-npm-release@2.0.1 | ||
id: release | ||
|
||
- name: Coverage Run | ||
run: | | ||
npm install --no-save c8 codecov | ||
npx c8 --reporter=lcovonly npm run test | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
publish: | ||
uses: NicTool/.github/.github/workflows/publish.yml@master | ||
secrets: inherit |