From 320ae479dbf725075de7314ff9fb3196aeb97fea Mon Sep 17 00:00:00 2001 From: kenorb Date: Sun, 1 Sep 2024 17:44:20 +0100 Subject: [PATCH] GHA: Fixes Test workflow --- .github/workflows/compile-mql.yml | 2 +- .github/workflows/test.yml | 41 ++++++++++++++++++++++--------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/.github/workflows/compile-mql.yml b/.github/workflows/compile-mql.yml index 99fd72a2f..e49eca469 100644 --- a/.github/workflows/compile-mql.yml +++ b/.github/workflows/compile-mql.yml @@ -79,7 +79,7 @@ jobs: run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname' shell: powershell - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: files-ex${{ matrix.version }} path: '**/*.ex[45]' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13d6077bf..d7e721da6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,12 +28,12 @@ jobs: path: tests skip_cleanup: true - Experts-MQL4: + test: defaults: run: shell: bash working-directory: tests - if: false + name: Test needs: compile runs-on: ubuntu-latest strategy: @@ -47,21 +47,29 @@ jobs: - StrategyTest-RSI - SummaryReportTest - TradeTest + version: [5] max-parallel: 4 steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: files-ex4 + name: files-ex${{ matrix.version }} + - name: List compiled files + run: find . -name '*.ex?' -type f -print - name: Run ${{ matrix.test }} uses: fx31337/mql-tester-action@master with: - BtDays: 4-12 - BtMonths: 1 - BtYears: 2021 - GitHubApiToken: ${{ github.token }} - TestExpert: ${{ matrix.test }} - RunOnError: show_logs 200 - if: always() + Login: ${{ secrets.MT5_LOGIN }} + Password: ${{ secrets.MT5_PASSWORD }} + Server: MetaQuotes-Demo + TestDeposit: 2000 + TestExpert: EA31337-${{ matrix.mode }}-${{ github.sha }} + TestFromDate: ${{ matrix.year }}.01.01 + TestPeriod: M1 + TestSymbol: EURUSD + TestToDate: ${{ matrix.year }}.01.14 + # yamllint disable-line rule:line-length + UrlExpert: file://${{ github.workspace }}/${{ matrix.test }}.ex${{ matrix.version }} + Version: 5 timeout-minutes: 10 Scripts-MQL4: @@ -92,3 +100,14 @@ jobs: Script: ${{ matrix.test }} if: always() timeout-minutes: 10 + + cleanup: + if: inputs.skip_cleanup != true + name: Clean-up + needs: [test] + runs-on: ubuntu-latest + steps: + - uses: geekyeggo/delete-artifact@v5 + with: + name: mt? + timeout-minutes: 5