Skip to content

Commit

Permalink
GHA: Fixes Indicator related CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Sep 2, 2024
1 parent b5cec19 commit 59f731b
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 36 deletions.
46 changes: 29 additions & 17 deletions .github/workflows/test-indicator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ name: Test Indicator
on:
pull_request:
paths:
- 'Indicator**'
- 'Indicator/**'
- '.github/workflows/test-indicator.yml'
- .github/workflows/test-indicator.yml
- Indicator**
- Indicator/**
push:
paths:
- 'Indicator**'
- 'Indicator/**'
- '.github/workflows/test-indicator.yml'
- .github/workflows/test-indicator.yml
- Indicator**
- Indicator/**

jobs:

Expand All @@ -24,12 +24,12 @@ jobs:
path: Indicator/tests
skip_cleanup: true

Tests-MQL4:
test:
defaults:
run:
shell: bash
working-directory: Indicator/tests
if: false
working-directory: ${{ env.TEST_PATH }}
name: Test
needs: compile
runs-on: ubuntu-latest
strategy:
Expand All @@ -42,20 +42,32 @@ jobs:
- IndicatorTf.test
- IndicatorTick.test
- IndicatorRenko.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
2 changes: 1 addition & 1 deletion .github/workflows/test-indicators-pricemulti.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: ./.github/workflows/compile-mql.yml
with:
artifact_prefix: mt
path: Indicators/Price/tests
path: Indicators/PriceMulti/tests
skip_cleanup: true

test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-indicators-pricerange.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: ./.github/workflows/compile-mql.yml
with:
artifact_prefix: mt
path: Indicators/Price/tests
path: Indicators/PriceRange/tests
skip_cleanup: true

test:
Expand Down
46 changes: 29 additions & 17 deletions .github/workflows/test-indicators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ name: Test Indicators
on:
pull_request:
paths:
- 'Indicator**'
- 'Indicators/**'
- '.github/workflows/test-indicators.yml'
- .github/workflows/test-indicators.yml
- Indicator**
- Indicators/**
push:
paths:
- 'Indicator**'
- 'Indicators/**'
- '.github/workflows/test-indicators.yml'
- .github/workflows/test-indicators.yml
- Indicator**
- Indicators/**

jobs:

Expand All @@ -24,12 +24,12 @@ jobs:
path: Indicators/tests
skip_cleanup: true

Tests-MQL4:
test:
defaults:
run:
shell: bash
working-directory: Indicators/tests
if: false
working-directory: ${{ env.TEST_PATH }}
name: Test
needs: compile
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -86,20 +86,32 @@ jobs:
- Indicators.test
# Requires refactoring:
# - Indi_DEMA.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

0 comments on commit 59f731b

Please sign in to comment.