-
-
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
santi100a
committed
Apr 1, 2023
1 parent
8c7785a
commit 55041dc
Showing
25 changed files
with
3,031 additions
and
349 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,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: npm # See documentation for possible values | ||
directory: / # Location of package manifests | ||
schedule: | ||
interval: weekly |
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 @@ | ||
'CI failed': '**/*.*' |
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,23 @@ | ||
name: Welcome message for issues | ||
on: | ||
issues: | ||
types: | ||
- opened | ||
permissions: | ||
issues: write | ||
jobs: | ||
welcome-author: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Say hi | ||
uses: jungwinter/comment@v1 | ||
with: | ||
type: create | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
issue_number: ${{ github.event.issue.number }} | ||
body: | | ||
Make sure to comply with the [Code of Conduct]( | ||
https://github.com/${{ github.repository }}/blob/main/CODE_OF_CONDUCT.md), | ||
[security policy](https://github.com/${{ github.repository }}/blob/main/SECURITY.md) | ||
and [contribution guidelines](https://github.com/${{ github.repository }}/blob/main/CONTRIBUTING.md) | ||
before contributing to this repo. |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
name: Report PR build failed | ||
on: | ||
workflow_call: | ||
inputs: | ||
number: | ||
required: true | ||
type: number | ||
pr-author: | ||
required: true | ||
type: string | ||
jobs: | ||
report-pr-build-failed: | ||
permissions: | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Report the build failed | ||
uses: jungwinter/comment@v1 | ||
with: | ||
type: create | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
issue_number: ${{ inputs.number }} | ||
body: | | ||
Hi, @${{ inputs.pr-author }}! I'm afraid the CI check for PR #${{ inputs.number }} has failed! | ||
Don't worry, it'll run again if you commit any changes to this PR. | ||
- name: Label PR as "CI failed" | ||
uses: actions/labeler@v4 | ||
with: | ||
sync-label: true | ||
repo-token: ${{ secrets.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Pull Request check | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- edited | ||
- opened | ||
- synchronize | ||
paths: | ||
- src/**/*.* | ||
jobs: | ||
test: | ||
permissions: | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Clone the main repo | ||
run: cd .. && sudo /usr/bin/git clone https://github.com/${{ github.repository }} main && cd - | ||
- name: Check if the PR is acceptable | ||
run: | | ||
diff -q ./tests/ ../main/tests | ||
diff -q ./.github/ ../main/.github | ||
- name: Copy test suites from main repo to PR | ||
run: cp ../main/tests/*.* tests/ | ||
- name: Get rid of the main repo's clone | ||
run: sudo rm -rf ../main | ||
- name: Install dependencies | ||
run: yarn | ||
- name: Build code | ||
run: yarn build | ||
- name: Run main test suites | ||
run: yarn test | ||
- name: Report build failed (if any) | ||
if: failure() | ||
uses: ./.github/workflows/pr-build-failed.yml | ||
with: | ||
pr-author: ${{ github.event.pull_request.user.login }} | ||
number: ${{ github.event.pull_request.number }} |
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,25 @@ | ||
name: Welcome message for pull requests | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
say-hi: | ||
permissions: | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Say hi | ||
uses: jungwinter/comment@v1 | ||
with: | ||
type: create | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
issue_number: ${{ github.event.pull_request.number }} | ||
body: | | ||
Hi, ${{ github.event.pull_request.user.login }}! Welcome to ${{ github.repository }} issues! | ||
Make sure to comply with the [Code of Conduct]( | ||
https://github.com/${{ github.repository }}/blob/main/CODE_OF_CONDUCT.md), [security policy]( | ||
https://github.com/${{ github.repository }}/blob/main/SECURITY.md) and [contribution guidelines | ||
](https://github.com/${{ github.repository }}/blob/main/CONTRIBUTING.md) before contributing to | ||
this repo. |
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,102 @@ | ||
name: Continuous Integration (CI) | ||
|
||
|
||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- src/**/*.* | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 19.x | ||
always-auth: true | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Build source code | ||
run: yarn build | ||
|
||
- name: Run test suites | ||
run: yarn test | ||
release: | ||
permissions: | ||
contents: write | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Generate tag, release name, and body | ||
run: | | ||
TAG_NAME="v$(jq -r '.version' package.json)" | ||
RELEASE_NAME="Release $TAG_NAME" | ||
BODY=$(sed -n "/## Version $(jq -r '.version' package.json | sed 's/\./\\\./g')/,/##/p" CHANGELOG.md | sed '1d;/^##/d') | ||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV | ||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV | ||
echo "$BODY" >> release.md | ||
- name: Create release | ||
uses: ncipollo/release-action@v1.12.0 | ||
with: | ||
allowUpdates: true | ||
tag: ${{ env.TAG_NAME }} | ||
name: ${{ env.RELEASE_NAME }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
bodyFile: release.md | ||
draft: false | ||
prerelease: false | ||
publish-npm: | ||
needs: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 19.x | ||
always-auth: true | ||
- name: Install dependencies | ||
run: yarn | ||
- name: Build code | ||
run: yarn build | ||
- name: Set access tokens | ||
run: | | ||
npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_AUTH_TOKEN }} | ||
- name: Publish to NPM | ||
run: yarn publish --access public | ||
publish-gpr: | ||
needs: release | ||
permissions: | ||
packages: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 19.x | ||
always-auth: true | ||
- name: Install dependencies | ||
run: yarn | ||
- name: Build code | ||
run: yarn build | ||
- name: Set access tokens | ||
run: | | ||
npm set //npm.pkg.github.com/:_authToken ${{ secrets.GPR_AUTH_TOKEN }} | ||
- name: Get ready to publish to GPR | ||
run: | | ||
jq ".name = \"@$REPO\"" package.json > temp.json && mv temp.json package.json | ||
env: | ||
REPO: ${{ github.repository }} | ||
- name: Publish to GPR | ||
run: yarn publish --access public --registry https://npm.pkg.github.com/ |
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,9 +1,5 @@ | ||
node_modules | ||
# yarn | ||
yarn.lock | ||
node_modules/ | ||
dev/ | ||
coverage/ | ||
|
||
# pnpm | ||
pnpm-lock.yaml | ||
|
||
# npm | ||
package-lock.json | ||
*.log |
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,3 +1,5 @@ | ||
src | ||
tests | ||
.github | ||
coverage | ||
.prettierrc |
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,6 @@ | ||
{ | ||
"singleQuote": true, | ||
"useTabs": true, | ||
"trailingComma": "none", | ||
"semi": true | ||
} |
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,3 @@ | ||
{ | ||
"typescript.tsdk": "node_modules\\typescript\\lib" | ||
} |
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 @@ | ||
# Changelog | ||
|
||
# Version 1.1.1 | ||
- Modified and refined many things. |
Oops, something went wrong.