Skip to content

Commit

Permalink
GHA: Fixes Storage CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Sep 2, 2024
1 parent 8da4122 commit f17541f
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 36 deletions.
43 changes: 31 additions & 12 deletions .github/workflows/test-storage-cache.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
name: Test Storage/Cache

env:
TEST_PATH: Storage/Cache/tests

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'Storage/Cache/**'
- '.github/workflows/test-storage-cache.yml'
- .github/workflows/test-storage-cache.yml
- Storage/Cache/**
push:
paths:
- 'Storage/Cache/**'
- '.github/workflows/test-storage-cache.yml'
- .github/workflows/test-storage-cache.yml
- Storage/Cache/**

jobs:

Expand All @@ -22,29 +25,45 @@ jobs:
path: Storage/Cache/tests
skip_cleanup: true

Tests-MQL4:
test:
defaults:
run:
shell: bash
working-directory: Storage/Cache/tests
if: false
working-directory: ${{ env.TEST_PATH }}
name: Test
needs: compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
- IndiBufferCache.test
- ObjectsCache.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
Expand Down
48 changes: 36 additions & 12 deletions .github/workflows/test-storage-dict-buffer.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
name: Test Storage/Dict/Buffer

env:
TEST_PATH: Storage/Dict/Buffer/tests

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'Storage/Dict/Buffer/**'
- '.github/workflows/test-storage-dict-buffer.yml'
- .github/workflows/test-storage-dict-buffer.yml
- Storage/Dict/Buffer/**
push:
paths:
- 'Storage/Dict/Buffer/**'
- '.github/workflows/test-storage-dict-buffer.yml'
- .github/workflows/test-storage-dict-buffer.yml
- Storage/Dict/Buffer/**

jobs:

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

Tests-MQL4:
test:
defaults:
run:
shell: bash
working-directory: Storage/Dict/Buffer/tests
if: false
working-directory: ${{ env.TEST_PATH }}
name: Test
needs: compile
runs-on: ubuntu-latest
strategy:
Expand All @@ -39,13 +42,34 @@ jobs:
- BufferFXT.test
- BufferStruct.test
- BufferTick.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
43 changes: 31 additions & 12 deletions .github/workflows/test-storage-dict.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
name: Test Storage/Dict

env:
TEST_PATH: Storage/Dict/tests

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'Storage/Dict/**'
- '.github/workflows/test-storage-dict.yml'
- .github/workflows/test-storage-dict.yml
- Storage/Dict/**
push:
paths:
- 'Storage/Dict/**'
- '.github/workflows/test-storage-dict.yml'
- .github/workflows/test-storage-dict.yml
- Storage/Dict/**

jobs:

Expand All @@ -22,28 +25,44 @@ jobs:
path: Storage/Dict/tests
skip_cleanup: true

Tests-MQL4:
test:
defaults:
run:
shell: bash
working-directory: Storage/Dict/tests
if: false
working-directory: ${{ env.TEST_PATH }}
name: Test
needs: compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
- Dict.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
Expand Down

0 comments on commit f17541f

Please sign in to comment.