Skip to content

Commit

Permalink
Update dst.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
guergabo authored Dec 20, 2023
1 parent 1bc7117 commit 6cfb7a9
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/dst.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ jobs:
path: resonate

seed:
if: ${{ !inputs.seed }}
runs-on: ubuntu-latest
steps:
- id: seed
name: Set random seed
run: echo seed=$RANDOM >> $GITHUB_OUTPUT
outputs:
seed: ${{ steps.seed.outputs.seed }}
seed: ${{ inputs.seed || steps.seed.outputs.seed }}

dst-sqlite-1:
runs-on: ubuntu-latest
Expand All @@ -51,19 +50,19 @@ jobs:
uses: actions/download-artifact@v3
with:
name: resonate
- name: Run dst (seed=${{ inputs.seed || needs.seed.outputs.seed }})
- name: Run dst (seed=${{ needs.seed.outputs.seed }})
run: |
chmod +x resonate
./resonate dst run --seed ${{ inputs.seed || needs.seed.outputs.seed }} --aio-store sqlite > logs.txt
./resonate dst run --seed ${{ needs.seed.outputs.seed }} --aio-store sqlite > logs.txt
- name: Create issue if dst failed
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
if: ${{ failure() }}
run: |
./resonate dst issue \
--seed ${{ inputs.seed || needs.seed.outputs.seed }} \
--seed ${{ needs.seed.outputs.seed }} \
--store sqlite \
--reason "DST run failed for seed=${{ inputs.seed || needs.seed.outputs.seed }} and store=sqlite." \
--reason "DST run failed for seed=${{ needs.seed.outputs.seed }} and store=sqlite." \
--file logs.txt \
--repo $GITHUB_REPOSITORY \
--commit $GITHUB_SHA
Expand All @@ -82,10 +81,10 @@ jobs:
uses: actions/download-artifact@v3
with:
name: resonate
- name: Run dst (seed=${{ inputs.seed || needs.seed.outputs.seed }})
- name: Run dst (seed=${{ needs.seed.outputs.seed }})
run: |
chmod +x resonate
./resonate dst run --seed ${{ inputs.seed || needs.seed.outputs.seed }} --aio-store sqlite > logs.txt
./resonate dst run --seed ${{ needs.seed.outputs.seed }} --aio-store sqlite > logs.txt
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
Expand Down Expand Up @@ -124,19 +123,19 @@ jobs:
uses: actions/download-artifact@v3
with:
name: resonate
- name: Run dst (seed=${{ inputs.seed || needs.seed.outputs.seed }})
- name: Run dst (seed=${{ needs.seed.outputs.seed }})
run: |
chmod +x resonate
./resonate dst run --seed ${{ inputs.seed || needs.seed.outputs.seed }} --aio-store postgres > logs.txt
./resonate dst run --seed ${{ needs.seed.outputs.seed }} --aio-store postgres > logs.txt
- name: Create issue if dst failed
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
if: ${{ failure() }}
run: |
./resonate dst issue \
--seed ${{ inputs.seed || needs.seed.outputs.seed }} \
--seed ${{ needs.seed.outputs.seed }} \
--store postgres \
--reason "DST run failed for seed=${{ inputs.seed || needs.seed.outputs.seed }} and store=postgres." \
--reason "DST run failed for seed=${{ needs.seed.outputs.seed }} and store=postgres." \
--file logs.txt \
--repo $GITHUB_REPOSITORY \
--commit $GITHUB_SHA
Expand Down Expand Up @@ -178,10 +177,10 @@ jobs:
uses: actions/download-artifact@v3
with:
name: resonate
- name: Run dst (seed=${{ inputs.seed || needs.seed.outputs.seed }})
- name: Run dst (seed=${{ needs.seed.outputs.seed }})
run: |
chmod +x resonate
./resonate dst run --seed ${{ inputs.seed || needs.seed.outputs.seed }} --aio-store postgres > logs.txt
./resonate dst run --seed ${{ needs.seed.outputs.seed }} --aio-store postgres > logs.txt
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
Expand Down Expand Up @@ -216,9 +215,9 @@ jobs:
run: |
chmod +x resonate
./resonate dst issue \
--seed ${{ inputs.seed || needs.seed.outputs.seed }} \
--seed ${{ needs.seed.outputs.seed }} \
--store sqlite \
--reason "Two DST runs produced different results for seed=${{ inputs.seed || needs.seed.outputs.seed }} and store=sqlite." \
--reason "Two DST runs produced different results for seed=${{ needs.seed.outputs.seed }} and store=sqlite." \
--repo $GITHUB_REPOSITORY \
--commit $GITHUB_SHA
Expand Down Expand Up @@ -250,9 +249,9 @@ jobs:
run: |
chmod +x resonate
./resonate dst issue \
--seed ${{ inputs.seed || needs.seed.outputs.seed }} \
--seed ${{ needs.seed.outputs.seed }} \
--store postgres \
--reason "Two DST runs produced different results for seed=${{ inputs.seed || needs.seed.outputs.seed }} and store=postgres." \
--reason "Two DST runs produced different results for seed=${{ needs.seed.outputs.seed }} and store=postgres." \
--repo $GITHUB_REPOSITORY \
--commit $GITHUB_SHA
Expand Down Expand Up @@ -284,7 +283,7 @@ jobs:
run: |
chmod +x resonate
./resonate dst issue \
--seed ${{ inputs.seed || needs.seed.outputs.seed }} \
--seed ${{ needs.seed.outputs.seed }} \
--store sqlite/postgres \
--reason "Two DST runs produced different results for seed=${{ needs.seed.outputs.seed }} and store=sqlite/postgres." \
--repo $GITHUB_REPOSITORY \
Expand Down

0 comments on commit 6cfb7a9

Please sign in to comment.