Skip to content

Commit

Permalink
GHA: Fixes further CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Sep 2, 2024
1 parent 11c0e68 commit cacd8e2
Show file tree
Hide file tree
Showing 7 changed files with 209 additions and 75 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-exchange.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
47 changes: 36 additions & 11 deletions .github/workflows/test-math.yml
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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:
Expand All @@ -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
50 changes: 35 additions & 15 deletions .github/workflows/test-serializer.yml
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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
48 changes: 36 additions & 12 deletions .github/workflows/test-storage.yml
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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:
Expand All @@ -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
47 changes: 36 additions & 11 deletions .github/workflows/test-task.yml
Original file line number Diff line number Diff line change
@@ -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:

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

0 comments on commit cacd8e2

Please sign in to comment.