Skip to content

Commit

Permalink
GHA: Fixes Platform CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Sep 2, 2024
1 parent 75a64fe commit b5cec19
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 48 deletions.
49 changes: 37 additions & 12 deletions .github/workflows/test-platform-chart.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
name: Test Platform
name: Test Platform/Chart

env:
TEST_PATH: Platform/Chart/tests

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'Platform/Chart/**'
- '.github/workflows/test-platform-chart.yml'
- .github/workflows/test-platform-chart.yml
- Platform/Chart/**
push:
paths:
- 'Platform/Chart/**'
- '.github/workflows/test-platform-chart.yml'
- .github/workflows/test-platform-chart.yml
- Platform/Chart/**

jobs:

Expand All @@ -22,25 +25,47 @@ jobs:
path: Platform/Chart/tests
skip_cleanup: true

Tests-MQL4:
test:
defaults:
run:
shell: bash
working-directory: Platform/Chart/tests
if: false
working-directory: ${{ env.TEST_PATH }}
name: Test
needs: compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
- Chart.test
- ChartMt.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 }}
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
50 changes: 38 additions & 12 deletions .github/workflows/test-platform-chart3d.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
name: Test Platform
name: Test Platform/Chart3D

env:
TEST_PATH: Platform/Chart3D/tests

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'Platform/Chart3D/**'
- '.github/workflows/test-platform-chart3d.yml'
- .github/workflows/test-platform-chart3d.yml
- Platform/Chart3D/**
push:
paths:
- 'Platform/Chart3D/**'
- '.github/workflows/test-platform-chart3d.yml'
- .github/workflows/test-platform-chart3d.yml
- Platform/Chart3D/**

jobs:

Expand All @@ -22,24 +25,47 @@ jobs:
path: Platform/Chart3D/tests
skip_cleanup: true

Tests-MQL4:
test:
defaults:
run:
shell: bash
working-directory: Platform/Chart3D/tests
if: false
working-directory: ${{ env.TEST_PATH }}
name: Test
needs: compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
- Chart3D.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 }}
timeout-minutes: 10
Login: ${{ secrets.MT5_LOGIN }}
Password: ${{ secrets.MT5_PASSWORD }}
RunnerTimeout: 1200 # 20 mins
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: 30

cleanup:
name: Clean-up
needs: [compile]
uses: ./.github/workflows/cleanup.yml
49 changes: 36 additions & 13 deletions .github/workflows/test-platform-web.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
name: Test Platform/Web

env:
TEST_PATH: Platform/Web/tests

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'Platform/Web/**'
- '.github/workflows/test-platform-web.yml'
- .github/workflows/test-platform-web.yml
- Platform/Web/**
push:
paths:
- 'Platform/Web/**'
- '.github/workflows/test-platform-web.yml'
- .github/workflows/test-platform-web.yml
- Platform/Web/**

jobs:

Expand All @@ -22,27 +25,47 @@ jobs:
path: Platform/Web/tests
skip_cleanup: true

Tests-MQL4:
test:
defaults:
run:
shell: bash
working-directory: Platform/Web/tests
if: false
working-directory: ${{ env.TEST_PATH }}
name: Test
needs: compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
# @fixme: GH-266
- Web.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 }}
RunOnFail: "exit 0"
if: always()
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
47 changes: 36 additions & 11 deletions .github/workflows/test-platform.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
name: Test Platform

env:
TEST_PATH: Platform/tests

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'Platform/**'
- '.github/workflows/test-platform.yml'
- .github/workflows/test-platform.yml
- Platform/**
push:
paths:
- 'Platform/**'
- '.github/workflows/test-platform.yml'
- .github/workflows/test-platform.yml
- Platform/**

jobs:

Expand All @@ -22,12 +25,12 @@ jobs:
path: Platform/tests
skip_cleanup: true

Tests-MQL4:
test:
defaults:
run:
shell: bash
working-directory: Platform/tests
if: false
working-directory: ${{ env.TEST_PATH }}
name: Test
needs: compile
runs-on: ubuntu-latest
strategy:
Expand All @@ -39,12 +42,34 @@ jobs:
- Platform.test
- Plot.test
- Terminal.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 }}
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

0 comments on commit b5cec19

Please sign in to comment.