-
-
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.
Merge pull request #32 from williamthome/refactor/improve_code
refactor: improve code
- Loading branch information
Showing
132 changed files
with
16,342 additions
and
5,684 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
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,81 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
node-version: [16.10.x, 17.x, 18.x] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run compile | ||
|
||
- name: Run tests | ||
uses: GabrielBB/[email protected] | ||
with: | ||
run: npm run test:ci | ||
|
||
- name: Coveralls | ||
# TODO: Check why Coveralls fails on Windows OS | ||
if: runner.os != 'Windows' | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel: true | ||
flag-name: run-os-${{ matrix.os }}-node-${{ matrix.node-version }} | ||
|
||
finish: | ||
needs: build | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Coveralls finished | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel-finished: true | ||
|
||
publish: | ||
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/pre-release' | ||
|
||
needs: build | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ^16.10 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install vsce | ||
run: npm i -g vsce | ||
|
||
- name: Publish to marketplace | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: vsce publish -p ${{ secrets.VSCE_PAT }} | ||
|
||
- name: Publish pre-release to marketplace | ||
if: github.ref == 'refs/heads/pre-release' | ||
run: vsce publish -p ${{ secrets.VSCE_PAT }} --pre-release |
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 |
---|---|---|
|
@@ -3,3 +3,5 @@ dist | |
node_modules | ||
.vscode-test/ | ||
*.vsix | ||
.eslintcache | ||
coverage |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,4 @@ | ||
{ | ||
"*.ts": "npm run prettify", | ||
"*.json": "npm run format" | ||
} |
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,17 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"printWidth": 80, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"trailingComma": "all", | ||
"useTabs": false, | ||
"overrides": [ | ||
{ | ||
"files": "*.ts", | ||
"options": { | ||
"parser": "typescript" | ||
} | ||
} | ||
] | ||
} |
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
Oops, something went wrong.