Skip to content

Commit

Permalink
Fixing the github workflows (#1927)
Browse files Browse the repository at this point in the history
* fixing if condition

* fixing if condition

* now added release as part of nightly tests

* updated changelog
  • Loading branch information
kessler-frost authored Feb 7, 2024
1 parent 7c9b2cb commit 88058e5
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 61 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/man_0_assign_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,6 +47,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
9 changes: 8 additions & 1 deletion .github/workflows/man_1_push_to_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -55,7 +62,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 }}"
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/man_2_create_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,7 +42,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
Expand All @@ -49,7 +56,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: |
Expand Down
26 changes: 23 additions & 3 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
name: nightly-tests

on:
push:
branches:
- develop
schedule:
- cron: "0 0 * * *"

Expand All @@ -36,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
88 changes: 34 additions & 54 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ 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 pre-release creation as part of `nightly-tests` workflow.

### Added

Expand Down

0 comments on commit 88058e5

Please sign in to comment.