From 7b70a263e96849d355bfbf2e932fc54de7e148cc Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Wed, 7 Feb 2024 07:23:51 -0500 Subject: [PATCH 1/4] fixing if condition --- .github/workflows/man_0_assign_version.yml | 2 +- .github/workflows/man_1_push_to_master.yml | 2 +- .github/workflows/man_2_create_prerelease.yml | 4 +- .github/workflows/nightly-tests.yml | 3 - .github/workflows/tests.yml | 88 +++++++------------ 5 files changed, 38 insertions(+), 61 deletions(-) diff --git a/.github/workflows/man_0_assign_version.yml b/.github/workflows/man_0_assign_version.yml index b9ce3d410..0657a6a84 100644 --- a/.github/workflows/man_0_assign_version.yml +++ b/.github/workflows/man_0_assign_version.yml @@ -40,6 +40,6 @@ jobs: needs: - license if: > - !github.event.inputs.nightly_tests_failed + !inputs.nightly_tests_failed uses: ./.github/workflows/changelog.yml secrets: inherit # pragma: allowlist secret diff --git a/.github/workflows/man_1_push_to_master.yml b/.github/workflows/man_1_push_to_master.yml index efe6d4db4..65928e69f 100644 --- a/.github/workflows/man_1_push_to_master.yml +++ b/.github/workflows/man_1_push_to_master.yml @@ -55,7 +55,7 @@ jobs: - name: Perform the push to master if develop is ahead id: push if: > - !github.event.inputs.assign_version_failed + !inputs.assign_version_failed run: | DEVELOP_VERSION="${{ steps.get-versions.outputs.develop_version }}" MASTER_VERSION="${{ steps.get-versions.outputs.master_version }}" diff --git a/.github/workflows/man_2_create_prerelease.yml b/.github/workflows/man_2_create_prerelease.yml index e982b8b37..d4e672910 100644 --- a/.github/workflows/man_2_create_prerelease.yml +++ b/.github/workflows/man_2_create_prerelease.yml @@ -35,7 +35,7 @@ jobs: name: Create a Prerelease uses: ./.github/workflows/release.yml if: > - !github.event.inputs.push_to_master_failed + !inputs.push_to_master_failed with: prerelease: true secrets: inherit # pragma: allowlist secret @@ -49,7 +49,7 @@ jobs: - name: Checkout master uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.branch_name }} + ref: ${{ inputs.branch_name }} - name: Format Slack message run: | diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index da7becdf1..b77ac526c 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -17,9 +17,6 @@ name: nightly-tests on: - push: - branches: - - develop schedule: - cron: "0 0 * * *" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b66ce1ebb..58189ba96 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -308,89 +308,69 @@ jobs: - name: Dump Covalent logs run: covalent logs - - name: Upload SDK report to Codecov with retry + - name: Upload SDK report to Codecov id: upload-sdk-report if: > env.RECOMMENDED_PLATFORM && (github.event_name == 'workflow_call' || steps.sdk-coverage.outcome == 'success') - uses: Wandalen/wretry.action@master + uses: codecov/codecov-action@v3 with: - action: codecov/codecov-action@v3 - with: | - files: ./sdk_coverage.xml - flags: SDK - name: "SDK Unit Tests" - fail_ci_if_error: true - attempt_limit: 5 - attempt_delay: 5000 - - - name: Upload Dispatcher report to Codecov with retry + files: ./sdk_coverage.xml + flags: SDK + name: "SDK Unit Tests" + fail_ci_if_error: true + + - name: Upload Dispatcher report to Codecov id: upload-dispatcher-report if: > env.RECOMMENDED_PLATFORM && (github.event_name == 'workflow_call' || steps.dispatcher-coverage.outcome == 'success') - uses: Wandalen/wretry.action@master + uses: codecov/codecov-action@v3 with: - action: codecov/codecov-action@v3 - with: | - files: ./dispatcher_coverage.xml - flags: Dispatcher - name: "Dispatcher Unit Tests" - fail_ci_if_error: true - attempt_limit: 5 - attempt_delay: 5000 - - - name: Upload Functional report to Codecov with retry + files: ./dispatcher_coverage.xml + flags: Dispatcher + name: "Dispatcher Unit Tests" + fail_ci_if_error: true + + - name: Upload Functional report to Codecov id: upload-functional-report if: > env.RECOMMENDED_PLATFORM && steps.functional-coverage.outcome == 'success' - uses: Wandalen/wretry.action@master + uses: codecov/codecov-action@v3 with: - action: codecov/codecov-action@v3 - with: | - files: ./functional_tests_coverage.xml - flags: Functional_Tests - name: "Functional Tests" - fail_ci_if_error: true - attempt_limit: 5 - attempt_delay: 5000 - - - name: Upload UI backend report to Codecov with retry + files: ./functional_tests_coverage.xml + flags: Functional_Tests + name: "Functional Tests" + fail_ci_if_error: true + + - name: Upload UI backend report to Codecov id: upload-ui-backend-report if: > env.RECOMMENDED_PLATFORM && (github.event_name == 'workflow_call' || steps.ui-backend-coverage.outcome == 'success') - uses: Wandalen/wretry.action@master + uses: codecov/codecov-action@v3 with: - action: codecov/codecov-action@v3 - with: | - files: ./ui_backend_coverage.xml - flags: UI_Backend - name: "UI Backend Unit Tests" - fail_ci_if_error: true - attempt_limit: 5 - attempt_delay: 5000 - - - name: Upload UI frontend report to Codecov with retry + files: ./ui_backend_coverage.xml + flags: UI_Backend + name: "UI Backend Unit Tests" + fail_ci_if_error: true + + - name: Upload UI frontend report to Codecov id: upload-ui-frontend-report if: > env.RECOMMENDED_PLATFORM && (github.event_name == 'workflow_call' || steps.ui-frontend-tests.outcome == 'success') - uses: Wandalen/wretry.action@master + uses: codecov/codecov-action@v3 with: - action: codecov/codecov-action@v3 - with: | - files: ./covalent_ui/webapp/coverage/clover.xml - flags: UI_Frontend - name: "UI Frontend Unit Tests" - fail_ci_if_error: true - attempt_limit: 5 - attempt_delay: 5000 + files: ./covalent_ui/webapp/coverage/clover.xml + flags: UI_Frontend + name: "UI Frontend Unit Tests" + fail_ci_if_error: true - name: Local Codecov id: local-codecov From 8bb9107f22c3808f9191a489cb65d3118c203564 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Wed, 7 Feb 2024 07:48:13 -0500 Subject: [PATCH 2/4] fixing if condition --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce526d4da..a8dca057b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removed `conda` releases from `release.yml`. - When pushing to `master`, now the version numbers of `develop` and `master` will be compared in `man_1_push_to_master`. - Upgraded checkout action to v4 in `release.yml`. +- Fixing the if condition for the manual workflows. ### Added From 8a101ba1261918657e288aa26df21389af94d998 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Wed, 7 Feb 2024 07:53:08 -0500 Subject: [PATCH 3/4] now added release as part of nightly tests --- .github/workflows/man_0_assign_version.yml | 7 ++++++ .github/workflows/man_1_push_to_master.yml | 7 ++++++ .github/workflows/man_2_create_prerelease.yml | 7 ++++++ .github/workflows/nightly-tests.yml | 23 +++++++++++++++++++ 4 files changed, 44 insertions(+) diff --git a/.github/workflows/man_0_assign_version.yml b/.github/workflows/man_0_assign_version.yml index 0657a6a84..8863caf16 100644 --- a/.github/workflows/man_0_assign_version.yml +++ b/.github/workflows/man_0_assign_version.yml @@ -26,6 +26,13 @@ on: description: "WARNING: Make sure the `nightly-tests` or the most recent `tests` workflow has passed successfully in develop before running this workflow. Uncheck this box if it has." + workflow_call: + inputs: + nightly_tests_failed: + type: boolean + required: true + default: false + permissions: id-token: write contents: read diff --git a/.github/workflows/man_1_push_to_master.yml b/.github/workflows/man_1_push_to_master.yml index 65928e69f..80db54dc3 100644 --- a/.github/workflows/man_1_push_to_master.yml +++ b/.github/workflows/man_1_push_to_master.yml @@ -26,6 +26,13 @@ on: description: "WARNING: Make sure the `man_0_assign_version` workflow has passed successfully before running this workflow. Uncheck this box if it has." + workflow_call: + inputs: + assign_version_failed: + type: boolean + required: true + default: false + permissions: id-token: write contents: read diff --git a/.github/workflows/man_2_create_prerelease.yml b/.github/workflows/man_2_create_prerelease.yml index d4e672910..c6c214870 100644 --- a/.github/workflows/man_2_create_prerelease.yml +++ b/.github/workflows/man_2_create_prerelease.yml @@ -26,6 +26,13 @@ on: description: "WARNING: Make sure the `man_1_push_to_master` workflow has passed successfully before running this workflow. Uncheck this box if it has." + workflow_call: + inputs: + push_to_master_failed: + type: boolean + required: true + default: false + permissions: id-token: write contents: read diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index b77ac526c..85d507218 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -33,5 +33,28 @@ jobs: tests: name: Unit and Functional Tests + needs: + - license uses: ./.github/workflows/tests.yml secrets: inherit # pragma: allowlist secret + + assign_version: + name: Assign Version + needs: + - tests + uses: ./.github/workflows/assign_version.yml + secrets: inherit # pragma: allowlist secret + + push_to_master: + name: Push to Master + needs: + - assign_version + uses: ./.github/workflows/push_to_master.yml + secrets: inherit # pragma: allowlist secret + + create_prerelease: + name: Create a Prerelease + needs: + - push_to_master + uses: ./.github/workflows/create_prerelease.yml + secrets: inherit # pragma: allowlist secret From f5919656c9fde00d8df729c673eb5d24fc27707e Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Wed, 7 Feb 2024 07:54:00 -0500 Subject: [PATCH 4/4] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8dca057b..9f0c12d99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - When pushing to `master`, now the version numbers of `develop` and `master` will be compared in `man_1_push_to_master`. - Upgraded checkout action to v4 in `release.yml`. - Fixing the if condition for the manual workflows. +- Added pre-release creation as part of `nightly-tests` workflow. ### Added