Skip to content

Commit

Permalink
GHA: Fixes Indicators CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Sep 2, 2024
1 parent 37d96da commit 11c0e68
Show file tree
Hide file tree
Showing 8 changed files with 281 additions and 136 deletions.
54 changes: 37 additions & 17 deletions .github/workflows/test-indicators-bitwise.yml
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -24,30 +27,47 @@ 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:
matrix:
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
54 changes: 37 additions & 17 deletions .github/workflows/test-indicators-ohlc.yml
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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
49 changes: 32 additions & 17 deletions .github/workflows/test-indicators-oscillator.yml
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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:
Expand All @@ -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
Expand Down
54 changes: 37 additions & 17 deletions .github/workflows/test-indicators-price.yml
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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:
Expand All @@ -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
Loading

0 comments on commit 11c0e68

Please sign in to comment.