From 11c0e68e1430fb9582cab528d71cc7e15481a3d9 Mon Sep 17 00:00:00 2001 From: kenorb Date: Mon, 2 Sep 2024 20:36:12 +0100 Subject: [PATCH] GHA: Fixes Indicators CI workflows --- .github/workflows/test-indicators-bitwise.yml | 54 +++++++++++++------ .github/workflows/test-indicators-ohlc.yml | 54 +++++++++++++------ .../workflows/test-indicators-oscillator.yml | 49 +++++++++++------ .github/workflows/test-indicators-price.yml | 54 +++++++++++++------ .../workflows/test-indicators-pricemulti.yml | 54 +++++++++++++------ .../workflows/test-indicators-pricerange.yml | 54 +++++++++++++------ .github/workflows/test-indicators-special.yml | 49 +++++++++++------ .github/workflows/test-indicators-tick.yml | 49 +++++++++++------ 8 files changed, 281 insertions(+), 136 deletions(-) diff --git a/.github/workflows/test-indicators-bitwise.yml b/.github/workflows/test-indicators-bitwise.yml index b039a37e2..d0122bffa 100644 --- a/.github/workflows/test-indicators-bitwise.yml +++ b/.github/workflows/test-indicators-bitwise.yml @@ -1,18 +1,21 @@ --- name: Test Indicators (Bitwise) +env: + TEST_PATH: Indicators/Bitwise/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Indicator/**' - - 'Indicators/Bitwise/**' - - '.github/workflows/test-indicators-bitwise.yml' + - .github/workflows/test-indicators-bitwise.yml + - Indicator/** + - Indicators/Bitwise/**' push: paths: - - 'Indicator**' - - 'Indicators/Bitwise/**' - - '.github/workflows/test-indicators-bitwise.yml' + - .github/workflows/test-indicators-bitwise.yml + - Indicator/** + - Indicators/Bitwise/** jobs: @@ -24,12 +27,12 @@ jobs: path: Indicators/Bitwise/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Indicators/Bitwise/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: @@ -37,17 +40,34 @@ jobs: test: - Indi_Candle.test - Indi_Pattern.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-indicators-ohlc.yml b/.github/workflows/test-indicators-ohlc.yml index a70376df2..74728180a 100644 --- a/.github/workflows/test-indicators-ohlc.yml +++ b/.github/workflows/test-indicators-ohlc.yml @@ -1,18 +1,21 @@ --- name: Test Indicators (OHLC) +env: + TEST_PATH: Indicators/OHLC/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Indicator/**' - - 'Indicators/OHLC/**' - - '.github/workflows/test-indicators-special.yml' + - .github/workflows/test-indicators-special.yml + - Indicator/** + - Indicators/OHLC/** push: paths: - - 'Indicator/**' - - 'Indicators/OHLC/**' - - '.github/workflows/test-indicators-special.yml' + - .github/workflows/test-indicators-special.yml + - Indicator/** + - Indicators/OHLC/** jobs: @@ -24,29 +27,46 @@ jobs: path: Indicators/OHLC/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Indicators/OHLC/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: matrix: test: - Indi_OHLC.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-indicators-oscillator.yml b/.github/workflows/test-indicators-oscillator.yml index bbf2151b2..67dfea524 100644 --- a/.github/workflows/test-indicators-oscillator.yml +++ b/.github/workflows/test-indicators-oscillator.yml @@ -1,18 +1,21 @@ --- name: Test Indicators (Oscillator) +env: + TEST_PATH: Indicators/Oscillator/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Indicator/**' - - 'Indicators/Oscillator/**' - - '.github/workflows/test-indicators-oscillator.yml' + - .github/workflows/test-indicators-oscillator.yml + - Indicator/** + - Indicators/Oscillator/** push: paths: - - 'Indicator/**' - - 'Indicators/Oscillator/**' - - '.github/workflows/test-indicators-oscillator.yml' + - .github/workflows/test-indicators-oscillator.yml + - Indicator/** + - Indicators/Oscillator/** jobs: @@ -24,12 +27,12 @@ jobs: path: Indicators/Oscillator/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Indicators/Oscillator/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: @@ -39,20 +42,32 @@ jobs: - Indi_RSI.test - Indi_Stochastic.test - Indi_WPR.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 diff --git a/.github/workflows/test-indicators-price.yml b/.github/workflows/test-indicators-price.yml index 6fd436577..fd4ded8ac 100644 --- a/.github/workflows/test-indicators-price.yml +++ b/.github/workflows/test-indicators-price.yml @@ -1,18 +1,21 @@ --- name: Test Indicators (Price) +env: + TEST_PATH: Indicators/Price/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Indicator/**' - - 'Indicators/Price/**' - - '.github/workflows/test-indicators-price.yml' + - .github/workflows/test-indicators-price.yml + - Indicator/** + - Indicators/Price/** push: paths: - - 'Indicator/**' - - 'Indicators/Price/**' - - '.github/workflows/test-indicators-price.yml' + - .github/workflows/test-indicators-price.yml + - Indicator/** + - Indicators/Price/** jobs: @@ -24,12 +27,12 @@ jobs: path: Indicators/Price/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Indicators/Price/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: @@ -38,17 +41,34 @@ jobs: - Indi_AppliedPrice.test - Indi_MA.test - Indi_Price.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-indicators-pricemulti.yml b/.github/workflows/test-indicators-pricemulti.yml index c10c3818a..2bf852d55 100644 --- a/.github/workflows/test-indicators-pricemulti.yml +++ b/.github/workflows/test-indicators-pricemulti.yml @@ -1,18 +1,21 @@ --- name: Test Indicators (PriceMulti) +env: + TEST_PATH: Indicators/PriceMulti/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Indicator/**' - - 'Indicators/PriceMulti/**' - - '.github/workflows/test-indicators-pricemulti.yml' + - .github/workflows/test-indicators-pricemulti.yml + - Indicator/** + - Indicators/PriceMulti/** push: paths: - - 'Indicator/**' - - 'Indicators/Price/**' - - '.github/workflows/test-indicators-pricemulti.yml' + - .github/workflows/test-indicators-pricemulti.yml + - Indicator/** + - Indicators/PriceMulti/** jobs: @@ -24,29 +27,46 @@ jobs: path: Indicators/Price/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Indicators/Price/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: matrix: test: - Indi_Alligator.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-indicators-pricerange.yml b/.github/workflows/test-indicators-pricerange.yml index 8ffbdff44..a293e74fd 100644 --- a/.github/workflows/test-indicators-pricerange.yml +++ b/.github/workflows/test-indicators-pricerange.yml @@ -1,18 +1,21 @@ --- name: Test Indicators (PriceRange) +env: + TEST_PATH: Indicators/PriceRange/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Indicator/**' - - 'Indicators/PriceRange/**' - - '.github/workflows/test-indicators-pricerange.yml' + - .github/workflows/test-indicators-pricerange.yml + - Indicator/** + - Indicators/PriceRange/** push: paths: - - 'Indicator/**' - - 'Indicators/Price/**' - - '.github/workflows/test-indicators-pricerange.yml' + - .github/workflows/test-indicators-pricerange.yml + - Indicator/** + - Indicators/PriceRange/** jobs: @@ -24,12 +27,12 @@ jobs: path: Indicators/Price/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Indicators/Price/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: @@ -39,17 +42,34 @@ jobs: - Indi_Envelopes.test - Indi_Pivot.test - Indi_SAR.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-indicators-special.yml b/.github/workflows/test-indicators-special.yml index a8e6327cf..2fed66ca6 100644 --- a/.github/workflows/test-indicators-special.yml +++ b/.github/workflows/test-indicators-special.yml @@ -1,18 +1,21 @@ --- name: Test Indicators (Special) +env: + TEST_PATH: Indicators/Special/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Indicator**' - - 'Indicators/Special/**' - - '.github/workflows/test-indicators-special.yml' + - .github/workflows/test-indicators-special.yml + - Indicator/** + - Indicators/Special/** push: paths: - - 'Indicator**' - - 'Indicators/Special/**' - - '.github/workflows/test-indicators-special.yml' + - .github/workflows/test-indicators-special.yml + - Indicator/** + - Indicators/Special/** jobs: @@ -24,12 +27,12 @@ jobs: path: Indicators/Special/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Indicators/Special/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: @@ -37,20 +40,32 @@ jobs: test: - Indi_Custom.test - Indi_Universal.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 diff --git a/.github/workflows/test-indicators-tick.yml b/.github/workflows/test-indicators-tick.yml index 5e895e921..d8cfe1da1 100644 --- a/.github/workflows/test-indicators-tick.yml +++ b/.github/workflows/test-indicators-tick.yml @@ -1,18 +1,21 @@ --- name: Test Indicators (Tick) +env: + TEST_PATH: Indicators/Tick/tests + # yamllint disable-line rule:truthy on: pull_request: paths: - - 'Indicator**' - - 'Indicators/Tick/**' - - '.github/workflows/test-indicators-tick.yml' + - .github/workflows/test-indicators-tick.yml + - Indicator/** + - Indicators/Tick/** push: paths: - - 'Indicator**' - - 'Indicators/Tick/**' - - '.github/workflows/test-indicators-tick.yml' + - .github/workflows/test-indicators-tick.yml + - Indicator/** + - Indicators/Tick/** jobs: @@ -24,32 +27,44 @@ jobs: path: Indicators/Tick/tests skip_cleanup: true - Tests-MQL4: + test: defaults: run: shell: bash - working-directory: Indicators/Tick/tests - if: false + working-directory: ${{ env.TEST_PATH }} + name: Test needs: compile runs-on: ubuntu-latest strategy: matrix: test: - Indi_Tick.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