Skip to content

Commit

Permalink
fix: nightly required
Browse files Browse the repository at this point in the history
  • Loading branch information
SotaTek-DuyLe committed Jun 28, 2024
1 parent 9023323 commit a4392b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ on:
workflow_call:
inputs:
nightly:
description: 'Set to true to run nightly targets'
description: When set to true, the workflow will run with nightly reports
required: false
type: boolean
default: false
type: string
aws_ecr_registry:
description: |
The AWS ECR registry that will be used to publish images
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

on:
schedule:
- cron: '0 0 * * 0'
- cron: '/10 * * * *'
workflow_call:
inputs:
earthfile:
Expand Down Expand Up @@ -130,28 +130,28 @@ jobs:
run: echo "nightly=${{ github.event.inputs.nightly }}" >> $GITHUB_ENV

- name: Report tests if nightly return false
if: env.nightly == 'false'
if: env.nightly == false
run: pytest --junitxml=report.xml

- name: Run nightly tests
if: env.nightly == 'true'
if: env.nightly == true
run: pytest --tag=nightly --junitxml=nightly-report.xml

- name: Generate coverage report
if: env.nightly == 'true'
if: env.nightly == true
run: |
coverage run -m pytest --tag=nightly
coverage xml -o nightly-coverage.xml
- name: Upload Test Report
if: env.nightly == 'true'
if: env.nightly == true
uses: actions/upload-artifact@v3
with:
name: nightly-test-report
path: nightly-report.xml

- name: Upload Coverage Report
if: env.nightly == 'true'
if: env.nightly == true
uses: actions/upload-artifact@v3
with:
name: nightly-coverage-report
Expand Down

0 comments on commit a4392b7

Please sign in to comment.