Skip to content

Commit

Permalink
GHA: Clean-up platform artifacts after the test
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Apr 24, 2024
1 parent 07c18af commit 87d473d
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 6 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Clean-up

# yamllint disable-line rule:truthy
on:
workflow_call:
inputs:
artifact_prefix:
default: mt
description: Artifact prefix to clean up.
required: false
type: string

jobs:

cleanup:
name: Clean-up
runs-on: ubuntu-latest
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: ${{ inputs.artifact_prefix }}*
timeout-minutes: 5
7 changes: 1 addition & 6 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,5 @@ jobs:

cleanup:
if: inputs.skip_cleanup != true
name: Clean-up
needs: [compile]
runs-on: ubuntu-latest
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: ${{ env.ARTIFACT_PREFIX }}*
uses: ./.github/workflows/cleanup.yml
4 changes: 4 additions & 0 deletions .github/workflows/test-account.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ jobs:
with:
Script: ${{ matrix.test }}
timeout-minutes: 10

cleanup:
needs: [compile]
uses: ./.github/workflows/cleanup.yml
4 changes: 4 additions & 0 deletions .github/workflows/test-buffer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ jobs:
with:
Script: ${{ matrix.test }}
timeout-minutes: 10

cleanup:
needs: [compile]
uses: ./.github/workflows/cleanup.yml
4 changes: 4 additions & 0 deletions .github/workflows/test-indicator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ jobs:
BtYears: 2020
TestExpert: ${{ matrix.test }}
timeout-minutes: 10

cleanup:
needs: [compile]
uses: ./.github/workflows/cleanup.yml
4 changes: 4 additions & 0 deletions .github/workflows/test-indicators-special.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ jobs:
BtYears: 2020
TestExpert: ${{ matrix.test }}
timeout-minutes: 10

cleanup:
needs: [compile]
uses: ./.github/workflows/cleanup.yml
4 changes: 4 additions & 0 deletions .github/workflows/test-indicators-tick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ jobs:
BtYears: 2020
TestExpert: ${{ matrix.test }}
timeout-minutes: 10

cleanup:
needs: [compile]
uses: ./.github/workflows/cleanup.yml
4 changes: 4 additions & 0 deletions .github/workflows/test-indicators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,7 @@ jobs:
BtYears: 2020
TestExpert: ${{ matrix.test }}
timeout-minutes: 10

cleanup:
needs: [compile]
uses: ./.github/workflows/cleanup.yml
4 changes: 4 additions & 0 deletions .github/workflows/test-tick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ jobs:
uses: fx31337/mql-tester-action@master
with:
Script: ${{ matrix.test }}

cleanup:
needs: [compile]
uses: ./.github/workflows/cleanup.yml
4 changes: 4 additions & 0 deletions .github/workflows/test-trade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ jobs:
with:
Script: ${{ matrix.test }}
timeout-minutes: 10

cleanup:
needs: [compile]
uses: ./.github/workflows/cleanup.yml
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,7 @@ jobs:
with:
Script: ${{ matrix.test }}
timeout-minutes: 10

cleanup:
needs: [compile]
uses: ./.github/workflows/cleanup.yml

0 comments on commit 87d473d

Please sign in to comment.