forked from rudderlabs/rudder-transformer
-
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 #77 from scheduleonce/technocrats/ONCEHUB-79295-ma…
…ster fix: pull rudder transformer changes from rudderlabs to master branch
- Loading branch information
Showing
902 changed files
with
194,047 additions
and
229,895 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
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 |
---|---|---|
|
@@ -41,12 +41,12 @@ jobs: | |
runs-on: [self-hosted, Linux, ARM64] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.5.3 | ||
uses: actions/checkout@v4.1.1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2.9.1 | ||
uses: docker/setup-buildx-action@v3.0.0 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
|
@@ -56,7 +56,7 @@ jobs: | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build Docker Image | ||
uses: docker/build-push-action@v4.1.1 | ||
uses: docker/build-push-action@v5.1.0 | ||
with: | ||
context: . | ||
file: ${{ inputs.dockerfile }} | ||
|
@@ -72,7 +72,7 @@ jobs: | |
docker run ${{ inputs.build_tag }} npm run test:ts:ci | ||
- name: Build and Push Multi-platform Images | ||
uses: docker/build-push-action@v4.1.1 | ||
uses: docker/build-push-action@v5.1.0 | ||
with: | ||
context: . | ||
file: ${{ inputs.dockerfile }} | ||
|
@@ -92,12 +92,12 @@ jobs: | |
runs-on: [self-hosted, Linux, X64] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.5.3 | ||
uses: actions/checkout@v4.1.1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2.9.1 | ||
uses: docker/setup-buildx-action@v3.0.0 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
|
@@ -106,7 +106,7 @@ jobs: | |
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }} | ||
|
||
- name: Build Docker Image | ||
uses: docker/build-push-action@v4.1.1 | ||
uses: docker/build-push-action@v5.1.0 | ||
with: | ||
context: . | ||
file: ${{ inputs.dockerfile }} | ||
|
@@ -122,7 +122,7 @@ jobs: | |
docker run ${{ inputs.build_tag }} npm run test:ts:ci | ||
- name: Build and Push Multi-platform Images | ||
uses: docker/build-push-action@v4.1.1 | ||
uses: docker/build-push-action@v5.1.0 | ||
with: | ||
context: . | ||
file: ${{ inputs.dockerfile }} | ||
|
@@ -144,7 +144,7 @@ jobs: | |
|
||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2.9.1 | ||
uses: docker/setup-buildx-action@v3.0.0 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
|
@@ -161,7 +161,7 @@ jobs: | |
if: ${{ inputs.build_type == 'dt' }} | ||
run: | | ||
docker buildx imagetools create -t rudderstack/rudder-transformer:latest ${{ inputs.push_tags }}-amd64 ${{ inputs.push_tags }}-arm64 | ||
- name: Create latest ut multi-arch manifest | ||
# To be triggered only for release/hotfix PR merges coming from `prepare-for-prod-ut-deploy.yaml` | ||
if: ${{ inputs.build_type == 'ut' }} | ||
|
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/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected] | ||
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,77 @@ | ||
name: Component Test Reporter | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
permissions: | ||
id-token: write # allows the JWT to be requested from GitHub's OIDC provider | ||
contents: read # This is required for actions/checkout | ||
|
||
jobs: | ||
test_and_upload: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: arn:aws:iam::${{ secrets.AWS_DEV_ACCOUNT_ID }}:role/${{ secrets.AWS_DEV_S3_SYNC_ROLE }} | ||
aws-region: us-east-1 | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Run Tests and Generate Report | ||
run: | | ||
npm run test:ts -- component | ||
- name: Uplaod Report to S3 | ||
run: | | ||
aws s3 cp ./test_reports/ s3://test-integrations-dev/integrations-test-reports/rudder-transformer/${{ github.event.number }}/ --recursive | ||
- name: Add Test Report Link as Comment on PR | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.PAT }} | ||
script: | | ||
const { owner, repo } = context.repo; | ||
// Get the pull request number | ||
const prNumber = context.payload.pull_request.number; | ||
const commentBody = `Test report for this run is available at: https://test-integrations-dev.s3.amazonaws.com/integrations-test-reports/rudder-transformer/${prNumber}/test-report.html`; | ||
// find all the comments of the PR | ||
const issueComments = await github.paginate(github.rest.issues.listComments, { | ||
owner, | ||
repo, | ||
issue_number: prNumber, | ||
}); | ||
for (const comment of issueComments) { | ||
if (comment.body === commentBody) { | ||
console.log('Comment already exists'); | ||
return; | ||
} | ||
} | ||
// Comment on the pull request | ||
await github.rest.issues.createComment({ | ||
owner, | ||
repo, | ||
issue_number: prNumber, | ||
body: commentBody | ||
}); |
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
# Only allow these users to create new hotfix branch from 'main' | ||
if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'ujjwal-ab') | ||
if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'koladilip' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'utsabc') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'koladilip' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'utsabc') | ||
steps: | ||
- name: Create Branch | ||
uses: peterjgrainger/[email protected] | ||
|
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,4 +1,4 @@ | ||
name: Report Code Coverage | ||
name: DT Tests | ||
on: | ||
workflow_call: | ||
secrets: | ||
|
@@ -15,12 +15,12 @@ jobs: | |
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.5.3 | ||
uses: actions/checkout@v4.1.1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3.7.0 | ||
uses: actions/setup-node@v4.0.2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
@@ -30,21 +30,24 @@ jobs: | |
|
||
- name: Run Tests | ||
run: | | ||
npm run test:js:ci | ||
npm run test:ts:ci | ||
# Supress logging in tests | ||
LOG_LEVEL=100 npm run test:js:ci | ||
LOG_LEVEL=100 npm run test:ts:ci | ||
- name: Run Lint Checks | ||
run: | | ||
npm run check:lint | ||
npm run lint:fix | ||
- name: Upload Coverage Reports to Codecov | ||
uses: codecov/codecov-action@v3.1.4 | ||
uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
directory: ./reports/coverage | ||
|
||
- name: Upload TS Coverage Reports to Codecov | ||
uses: codecov/[email protected] | ||
uses: codecov/[email protected] | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
directory: ./reports/ts-coverage | ||
|
||
|
@@ -57,7 +60,7 @@ jobs: | |
- name: SonarCloud Scan | ||
if: always() | ||
uses: SonarSource/sonarcloud-github-action@v2.0.0 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ jobs: | |
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/stale@v8.0.0 | ||
- uses: actions/stale@v9.0.0 | ||
with: | ||
repo-token: ${{ secrets.PAT }} | ||
operations-per-run: 200 | ||
|
@@ -33,10 +33,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.5.3 | ||
uses: actions/checkout@v4.1.1 | ||
|
||
- name: Delete Old Branches | ||
uses: beatlabs/[email protected].9 | ||
uses: beatlabs/[email protected].10 | ||
with: | ||
repo_token: ${{ secrets.PAT }} | ||
date: '3 months ago' | ||
|
Oops, something went wrong.