-
Notifications
You must be signed in to change notification settings - Fork 2
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
23 changed files
with
11,962 additions
and
5,648 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,4 @@ | ||
build | ||
test | ||
reports/ | ||
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
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,53 @@ | ||
## What are the changes introduced in this PR? | ||
|
||
Write a brief explainer on your code changes. | ||
|
||
## What is the related Linear task? | ||
|
||
Resolves INT-XXX | ||
|
||
## Please explain the objectives of your changes below | ||
|
||
Put down any required details on the broader aspect of your changes. If there are any dependent changes, **mandatorily** mention them here | ||
|
||
### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? | ||
|
||
N/A | ||
|
||
### Any new dependencies introduced with this change? | ||
|
||
N/A | ||
|
||
### Any new generic utility introduced or modified. Please explain the changes. | ||
|
||
N/A | ||
|
||
### Any technical or performance related pointers to consider with the change? | ||
|
||
N/A | ||
|
||
<hr> | ||
|
||
### Developer checklist | ||
|
||
- [ ] My code follows the style guidelines of this project | ||
|
||
- [ ] **No breaking changes are being introduced.** | ||
|
||
- [ ] All related docs linked with the PR? | ||
|
||
- [ ] All changes manually tested? | ||
|
||
- [ ] Any documentation changes needed with this change? | ||
|
||
- [ ] Is the PR limited to 10 file changes? | ||
|
||
- [ ] Is the PR limited to one linear task? | ||
|
||
- [ ] Are relevant unit and component test-cases added? | ||
|
||
### Reviewer checklist | ||
|
||
- [ ] Is the type of change in the PR title appropriate as per the changes? | ||
|
||
- [ ] Verified that there are no credentials or confidential data exposed with the changes. |
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,36 @@ | ||
name: Commitlint | ||
|
||
on: [push] | ||
|
||
jobs: | ||
commitlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4.0.1 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Print versions | ||
run: | | ||
git --version | ||
node --version | ||
npm --version | ||
npx commitlint --version | ||
# Run the commitlint action, considering its own dependencies and yours as well 🚀 | ||
# `github.workspace` is the path to your repository. | ||
- uses: wagoid/commitlint-github-action@v5 | ||
env: | ||
NODE_PATH: ${{ github.workspace }}/node_modules | ||
with: | ||
commitDepth: 1 |
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,60 @@ | ||
name: Tests with lint check and code coverage | ||
on: | ||
workflow_call: | ||
secrets: | ||
SONAR_TOKEN: | ||
required: true | ||
|
||
pull_request: | ||
types: ['opened', 'reopened', 'synchronize'] | ||
|
||
jobs: | ||
coverage: | ||
name: Tests with lint check and code coverage | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4.1.1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4.0.1 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Run Tests & lint check | ||
run: | | ||
npm run test | ||
npm run check:lint | ||
- name: Upload Coverage Reports to Codecov | ||
uses: codecov/codecov-action@v3.1.4 | ||
with: | ||
directory: ./reports/coverage | ||
|
||
- name: Update sonar-project.properties | ||
run: | | ||
# Retrieve the version from package.json | ||
version=$(node -e "console.log(require('./package.json').version)") | ||
# Update the sonar-project.properties file with the version | ||
sed -i "s/sonar.projectVersion=.*$/sonar.projectVersion=$version/" sonar-project.properties | ||
- name: Fix filesystem paths in generated reports | ||
if: always() | ||
run: | | ||
sed -i 's+home/runner/work/rudderstack-shopify-tracker/rudderstack-shopify-tracker+/github/workspace+g' reports/coverage/lcov.info | ||
sed -i 's+/home/runner/work/rudderstack-shopify-tracker/rudderstack-shopify-tracker+/github/workspace+g' reports/eslint.json | ||
- name: SonarCloud Scan | ||
if: always() | ||
uses: SonarSource/sonarcloud-github-action@v2.1.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_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
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,5 @@ | ||
node_modules/ | ||
reports/ | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE |
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,24 @@ | ||
{ | ||
"prettier.requireConfig": true, | ||
"prettier.configPath": ".prettierrc", | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[yaml]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": "never" | ||
}, | ||
"eslint.validate": ["javascript", "typescript"] | ||
} |
Oops, something went wrong.