-
-
Notifications
You must be signed in to change notification settings - Fork 100
80 lines (74 loc) · 2.01 KB
/
test-task.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
name: Test Task
env:
TEST_PATH: Task/tests
TEST_SKIP: ${{ secrets.MT5_LOGIN == '' }}
# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- .github/workflows/test-task.yml
- Task/**
push:
paths:
- .github/workflows/test-task.yml
- Task/**
jobs:
compile:
name: Compile
uses: ./.github/workflows/compile-mql.yml
with:
artifact_prefix: mt
path: Task/tests
skip_cleanup: true
test:
defaults:
run:
shell: bash
working-directory: ${{ env.TEST_PATH }}
name: Test
needs: compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
- Task.test
- TaskAction.test
- TaskCondition.test
- TaskGetter.test
- TaskManager.test
- TaskObject.test
- TaskSetter.test
- Taskable.car.test
- Taskable.test
version: [5]
max-parallel: 4
steps:
- uses: actions/download-artifact@v4
with:
name: files-ex${{ matrix.version }}
- name: List compiled files
run: find . -name '*.ex?' -type f -print
- if: ${{ env.TEST_SKIP != true && env.TEST_SKIP != 'true' }}
name: Run ${{ matrix.test }}
uses: fx31337/mql-tester-action@master
with:
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() && runner.debug == '1' }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 20
cleanup:
name: Clean-up
needs: [compile]
uses: ./.github/workflows/cleanup.yml