From e4e863391629585ffec9b68d01d7a51822d199fb Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 2 Oct 2024 14:27:55 -0400 Subject: [PATCH 1/4] Restrict release auto publish only on main branch Signed-off-by: Peter Zhu --- .github/workflows/releases.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 7e9a8a7..8b14814 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -2,6 +2,8 @@ name: Release Automation App on: push: + branches: + - main permissions: contents: write From 4e964955bb1f1f0267ae10a74ca57e61acb16c79 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 2 Oct 2024 14:29:50 -0400 Subject: [PATCH 2/4] Restrict release auto publish only on main branch Signed-off-by: Peter Zhu --- .github/workflows/releases.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 8b14814..0e0f6ba 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -10,6 +10,7 @@ permissions: jobs: release-automation-app: + if: github.repository == 'opensearch-project/automation-app' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 01267d173df429198ed8d4d7bba4a8e5e1654ba6 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 2 Oct 2024 14:33:59 -0400 Subject: [PATCH 3/4] Bump version Signed-off-by: Peter Zhu --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 70118d6..ad660bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opensearch-automation-app", - "version": "0.1.4", + "version": "0.1.5", "description": "An Automation App that handles all your GitHub Repository Activities", "author": "Peter Zhu", "homepage": "https://github.com/opensearch-project/automation-app", From 460a9f8e07762f09fbf16a869727077286b0385a Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 2 Oct 2024 15:13:46 -0400 Subject: [PATCH 4/4] Separate test and junit to two commands Signed-off-by: Peter Zhu --- .github/workflows/build-test.yml | 4 +++- package.json | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0e6d56d..a2e2030 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -25,8 +25,10 @@ jobs: - name: Verify styling failure msg if: steps.style_verify.outcome == 'failure' run: echo "Please run 'npm run format' before commiting the code!" - - name: Run build + - name: Run build test run: npm run build + - name: Run junit + run: npm run junit - name: Upload results to Codecov uses: codecov/codecov-action@v4 with: diff --git a/package.json b/package.json index ad660bd..b3a280b 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "format": "prettier --write src/**/*.ts test/**/*.ts configs/**/*.yml", "format-dryrun": "prettier --check src/**/*.ts test/**/*.ts configs/**/*.yml", "lint": "eslint --fix \"src/**/*.ts\" --ignore-pattern \"**/*.d.ts\"", - "test": "jest --coverage --reporters=jest-junit" + "test": "jest --coverage", + "junit": "jest --reporters=jest-junit" }, "dependencies": { "@aws-sdk/client-opensearch": "^3.658.1",