From cacd8e227ff753b4dca47b5134fd7359ae6baaa6 Mon Sep 17 00:00:00 2001 From: kenorb Date: Mon, 2 Sep 2024 20:48:29 +0100 Subject: [PATCH] GHA: Fixes further CI workflows --- .github/workflows/test-exchange.yml | 4 +-- .github/workflows/test-math.yml | 47 +++++++++++++++++++------ .github/workflows/test-serializer.yml | 50 +++++++++++++++++++-------- .github/workflows/test-storage.yml | 48 ++++++++++++++++++------- .github/workflows/test-task.yml | 47 +++++++++++++++++++------ .github/workflows/test-tick.yml | 41 ++++++++++++++++------ .github/workflows/test-trade.yml | 47 +++++++++++++++++-------- 7 files changed, 209 insertions(+), 75 deletions(-) diff --git a/.github/workflows/test-exchange.yml b/.github/workflows/test-exchange.yml index f26372c95..5e1260b36 100644 --- a/.github/workflows/test-exchange.yml +++ b/.github/workflows/test-exchange.yml @@ -8,12 +8,12 @@ env: on: pull_request: paths: - - '.github/workflows/test-exchange.yml' + - .github/workflows/test-exchange.yml - Exchange/**.h - Exchange/**.mq? push: paths: - - '.github/workflows/test-exchange.yml' + - .github/workflows/test-exchange.yml - Exchange/**.h - Exchange/**.mq? diff --git a/.github/workflows/test-math.yml b/.github/workflows/test-math.yml index 1dd047e14..6b9efd69b 100644 --- a/.github/workflows/test-math.yml +++ b/.github/workflows/test-math.yml @@ -1,16 +1,19 @@ --- name: Test Math +env: + TEST_PATH: Math/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Math/**' - - '.github/workflows/test-math.yml' + - .github/workflows/test-math.yml + - Math/** push: paths: - - 'Math/**' - - '.github/workflows/test-math.yml' + - .github/workflows/test-math.yml + - Math/** jobs: @@ -22,12 +25,12 @@ jobs: path: Math/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Math/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: @@ -36,12 +39,34 @@ jobs: - Math.test - Matrix.test - MatrixMini.test + 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: - Script: ${{ matrix.test }} - RunOnError: show_logs 200 + Login: ${{ secrets.MT5_LOGIN }} + Password: ${{ secrets.MT5_PASSWORD }} + Server: MetaQuotes-Demo + TestDeposit: 2000 + TestExpert: ${{ matrix.test }} + TestFromDate: ${{ matrix.year }}.01.01 + TestPeriod: M1 + TestSymbol: EURUSD + TestToDate: ${{ matrix.year }}.01.14 + # yamllint disable-line rule:line-length + UrlExpert: file://${{ github.workspace }}/${{ env.TEST_PATH }}/${{ matrix.test }}.ex${{ matrix.version }} + Version: 5 + - if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 20 + + cleanup: + name: Clean-up + needs: [compile] + uses: ./.github/workflows/cleanup.yml diff --git a/.github/workflows/test-serializer.yml b/.github/workflows/test-serializer.yml index f853dbd21..14fd63593 100644 --- a/.github/workflows/test-serializer.yml +++ b/.github/workflows/test-serializer.yml @@ -1,16 +1,19 @@ --- name: Test Serializer +env: + TEST_PATH: Serializer/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Serializer/**' - - '.github/workflows/test-serializer.yml' + - .github/workflows/test-serializer.yml + - Serializer/** push: paths: - - 'Serializer/**' - - '.github/workflows/test-serializer.yml' + - .github/workflows/test-serializer.yml + - Serializer/** jobs: @@ -22,29 +25,46 @@ jobs: path: Serializer/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Serializer/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: matrix: test: - Serializer.test + 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-8 - BtMonths: 1 - BtYears: 2021 - GitHubApiToken: ${{ github.token }} - RunOnError: show_logs 200 + Login: ${{ secrets.MT5_LOGIN }} + Password: ${{ secrets.MT5_PASSWORD }} + Server: MetaQuotes-Demo + TestDeposit: 2000 TestExpert: ${{ matrix.test }} - timeout-minutes: 10 + TestFromDate: ${{ matrix.year }}.01.01 + TestPeriod: M1 + TestSymbol: EURUSD + TestToDate: ${{ matrix.year }}.01.14 + # yamllint disable-line rule:line-length + UrlExpert: file://${{ github.workspace }}/${{ env.TEST_PATH }}/${{ matrix.test }}.ex${{ matrix.version }} + Version: 5 + - if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 20 + + cleanup: + name: Clean-up + needs: [compile] + uses: ./.github/workflows/cleanup.yml diff --git a/.github/workflows/test-storage.yml b/.github/workflows/test-storage.yml index 6e665da18..a23839cb4 100644 --- a/.github/workflows/test-storage.yml +++ b/.github/workflows/test-storage.yml @@ -1,16 +1,19 @@ --- name: Test Storage +env: + TEST_PATH: Storage/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Storage/**' - - '.github/workflows/test-storage.yml' + - .github/workflows/test-storage.yml + - Storage/** push: paths: - - 'Storage/**' - - '.github/workflows/test-storage.yml' + - .github/workflows/test-storage.yml + - Storage/** jobs: @@ -22,12 +25,12 @@ jobs: path: Storage/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Storage/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: @@ -40,13 +43,34 @@ jobs: - Object.test - Redis.test - ValueStorage.test + 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: - Script: ${{ matrix.test }} - RunOnError: show_logs 200 - timeout-minutes: 10 + Login: ${{ secrets.MT5_LOGIN }} + Password: ${{ secrets.MT5_PASSWORD }} + Server: MetaQuotes-Demo + TestDeposit: 2000 + TestExpert: ${{ matrix.test }} + TestFromDate: ${{ matrix.year }}.01.01 + TestPeriod: M1 + TestSymbol: EURUSD + TestToDate: ${{ matrix.year }}.01.14 + # yamllint disable-line rule:line-length + UrlExpert: file://${{ github.workspace }}/${{ env.TEST_PATH }}/${{ matrix.test }}.ex${{ matrix.version }} + Version: 5 + - if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 20 + + cleanup: + name: Clean-up + needs: [compile] + uses: ./.github/workflows/cleanup.yml diff --git a/.github/workflows/test-task.yml b/.github/workflows/test-task.yml index e34656352..fb1be5be4 100644 --- a/.github/workflows/test-task.yml +++ b/.github/workflows/test-task.yml @@ -1,16 +1,19 @@ --- name: Test Task +env: + TEST_PATH: Task/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Task/**' - - '.github/workflows/test-task.yml' + - .github/workflows/test-task.yml + - Task/** push: paths: - - 'Task/**' - - '.github/workflows/test-task.yml' + - .github/workflows/test-task.yml + - Task/** jobs: @@ -22,12 +25,12 @@ jobs: path: Task/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Task/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: @@ -42,12 +45,34 @@ jobs: - TaskSetter.test - Taskable.car.test - Taskable.test + 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: - Script: ${{ matrix.test }} - RunOnError: show_logs 200 + Login: ${{ secrets.MT5_LOGIN }} + Password: ${{ secrets.MT5_PASSWORD }} + Server: MetaQuotes-Demo + TestDeposit: 2000 + TestExpert: ${{ matrix.test }} + TestFromDate: ${{ matrix.year }}.01.01 + TestPeriod: M1 + TestSymbol: EURUSD + TestToDate: ${{ matrix.year }}.01.14 + # yamllint disable-line rule:line-length + UrlExpert: file://${{ github.workspace }}/${{ env.TEST_PATH }}/${{ matrix.test }}.ex${{ matrix.version }} + Version: 5 + - if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 20 + + cleanup: + name: Clean-up + needs: [compile] + uses: ./.github/workflows/cleanup.yml diff --git a/.github/workflows/test-tick.yml b/.github/workflows/test-tick.yml index ccf023c49..367ee78f6 100644 --- a/.github/workflows/test-tick.yml +++ b/.github/workflows/test-tick.yml @@ -1,16 +1,19 @@ --- name: Test Tick +env: + TEST_PATH: Tick/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Tick/**.h' - - '.github/workflows/test-tick.yml' + - .github/workflows/test-tick.yml + - Tick/**.h push: paths: - - 'Tick/**.h' - - '.github/workflows/test-tick.yml' + - .github/workflows/test-tick.yml + - Tick/**.h jobs: @@ -22,26 +25,44 @@ jobs: path: Tick/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Tick/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: matrix: test: - TickManager.test + 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: - Script: ${{ matrix.test }} + Login: ${{ secrets.MT5_LOGIN }} + Password: ${{ secrets.MT5_PASSWORD }} + Server: MetaQuotes-Demo + TestDeposit: 2000 + TestExpert: ${{ matrix.test }} + TestFromDate: ${{ matrix.year }}.01.01 + TestPeriod: M1 + TestSymbol: EURUSD + TestToDate: ${{ matrix.year }}.01.14 + # yamllint disable-line rule:line-length + UrlExpert: file://${{ github.workspace }}/${{ env.TEST_PATH }}/${{ matrix.test }}.ex${{ matrix.version }} + Version: 5 + - if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 20 cleanup: name: Clean-up diff --git a/.github/workflows/test-trade.yml b/.github/workflows/test-trade.yml index bcb389b96..5b6964b3c 100644 --- a/.github/workflows/test-trade.yml +++ b/.github/workflows/test-trade.yml @@ -1,18 +1,21 @@ --- name: Test Trade +env: + TEST_PATH: Trade/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Trade/**.h' - - 'Trade/**.mq?' - - '.github/workflows/test-trade.yml' + - .github/workflows/test-trade.yml + - Trade/**.h + - Trade/**.mq? push: paths: - - 'Trade/**.h' - - 'Trade/**.mq?' - - '.github/workflows/test-trade.yml' + - .github/workflows/test-trade.yml + - Trade/**.h + - Trade/**.mq? jobs: @@ -24,12 +27,12 @@ jobs: path: Trade/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Trade/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: @@ -37,16 +40,32 @@ jobs: test: - TradeSignal.test - TradeSignalManager.test + 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: - Script: ${{ matrix.test }} - RunOnError: show_logs 200 - timeout-minutes: 10 + Login: ${{ secrets.MT5_LOGIN }} + Password: ${{ secrets.MT5_PASSWORD }} + Server: MetaQuotes-Demo + TestDeposit: 2000 + TestExpert: ${{ matrix.test }} + TestFromDate: ${{ matrix.year }}.01.01 + TestPeriod: M1 + TestSymbol: EURUSD + TestToDate: ${{ matrix.year }}.01.14 + # yamllint disable-line rule:line-length + UrlExpert: file://${{ github.workspace }}/${{ env.TEST_PATH }}/${{ matrix.test }}.ex${{ matrix.version }} + Version: 5 + - if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 20 cleanup: name: Clean-up