Skip to content

Commit

Permalink
Require current deploy to run nightly tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbertra committed Mar 28, 2023
1 parent 8e7d675 commit 92a8f6e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/nightly.yml
Expand Up @@ -12,10 +12,30 @@ on:
- cron: 0 0 * * *
# Allow running manually
workflow_dispatch:
push:
branches:
- plt-4246-nightly-tests

jobs:
check-deploy:
runs-on: ubuntu-latest
steps:
- name: Check deploy
run: |
CURRENT_DEPLOY=$(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/input-output-hk/marlowe-cardano/actions/workflows/deploy.yml/runs\?per_page\=1\&branch\=main\&status\=success | jq --raw-output '.workflow_runs[0].head_sha')
if [ $CURRENT_DEPLOY != $GITHUB_SHA ];
then
echo "Unable to run nightly tests on $GITHUB_SHA, currently deployed commit is $CURRENT_DEPLOY"
exit 1
fi
marlowe-finder:
runs-on: ubuntu-latest
needs: [check-deploy]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -55,8 +75,10 @@ jobs:
:
done
result/bin/marlowe-finder --end-at-tip
marlowe-scaling:
runs-on: ubuntu-latest
needs: [check-deploy]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down

0 comments on commit 92a8f6e

Please sign in to comment.