From 3ecca750203d81c786ecf998bb4093c6fe9d5a17 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 | 61 +++++++++++++++++++++---------- 2 files changed, 42 insertions(+), 21 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..93b6ef94f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,41 +28,51 @@ 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: matrix: test: - - EATest - - MailTest - - MarketTest - - StatsTest - - StrategyTest - - StrategyTest-RSI - - SummaryReportTest - - TradeTest + - tests/EATest + - tests/MailTest + - tests/MarketTest + - tests/StatsTest + - tests/StrategyTest + - tests/StrategyTest-RSI + - tests/SummaryReportTest + - tests/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() - timeout-minutes: 10 + 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 + - if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 20 Scripts-MQL4: defaults: @@ -92,3 +102,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