|
1 | 1 | ---
|
2 |
| -name: Backtest |
| 2 | +name: Test |
3 | 3 |
|
4 | 4 | # yamllint disable-line rule:truthy
|
5 | 5 | on:
|
6 | 6 | pull_request:
|
7 | 7 | branches:
|
8 | 8 | - 'master'
|
9 |
| - - 'dev*' |
| 9 | + - '*dev*' |
10 | 10 | paths-ignore:
|
11 | 11 | - '*.md'
|
12 | 12 | push:
|
13 | 13 | branches:
|
14 | 14 | - 'master'
|
15 |
| - - 'dev*' |
| 15 | + - '*dev*' |
16 | 16 | paths-ignore:
|
17 | 17 | - '*.md'
|
18 | 18 |
|
19 | 19 | jobs:
|
20 |
| - Compile: |
21 |
| - defaults: |
22 |
| - run: |
23 |
| - shell: powershell |
24 |
| - runs-on: windows-latest |
25 |
| - steps: |
26 |
| - - uses: actions/checkout@v2 |
27 |
| - - uses: actions/checkout@v2 |
28 |
| - with: |
29 |
| - path: Include/EA31337-classes |
30 |
| - ref: v3.000.2 |
31 |
| - repository: EA31337/EA31337-classes |
32 |
| - - name: Compile for MQL4 |
33 |
| - uses: fx31337/mql-compile-action@master |
34 |
| - with: |
35 |
| - include: . |
36 |
| - init-platform: true |
37 |
| - mt-version: 5.0.0.2361 |
38 |
| - path: Stg_ZigZag.mq4 |
39 |
| - verbose: true |
40 |
| - - name: Compile for MQL5 |
41 |
| - uses: fx31337/mql-compile-action@master |
42 |
| - with: |
43 |
| - include: . |
44 |
| - mt-version: 5.0.0.2515 |
45 |
| - path: Stg_ZigZag.mq5 |
46 |
| - verbose: true |
47 |
| - - name: List compiled files |
48 |
| - run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname' |
49 |
| - - run: Get-Location |
50 |
| - - name: Upload artifacts |
51 |
| - uses: actions/upload-artifact@v2 |
52 |
| - with: |
53 |
| - name: EA |
54 |
| - path: '*.ex[45]' |
55 |
| - Test: |
56 |
| - needs: Compile |
| 20 | + |
| 21 | + compile: |
| 22 | + name: Compile |
| 23 | + uses: ./.github/workflows/compile.yml |
| 24 | + |
| 25 | + test: |
| 26 | + name: Test |
| 27 | + needs: compile |
57 | 28 | runs-on: ubuntu-latest
|
58 | 29 | strategy:
|
59 | 30 | matrix:
|
60 |
| - month: [1] |
61 |
| - year: [2019, 2020] |
| 31 | + file: |
| 32 | + - Stg_ZigZag |
| 33 | + year: [2022, 2024] |
| 34 | + version: [5] |
62 | 35 | steps:
|
63 |
| - - uses: actions/download-artifact@v2 |
| 36 | + - uses: actions/download-artifact@v4 |
64 | 37 | with:
|
65 |
| - name: EA |
66 |
| - - name: Run strategy |
67 |
| - uses: ea31337/mql-tester-action@master |
| 38 | + merge-multiple: true |
| 39 | + pattern: Strategy-ex${{ matrix.version }} |
| 40 | + |
| 41 | + - name: List compiled files |
| 42 | + run: find . -name '*.ex?' -type f -print |
| 43 | + |
| 44 | + - name: Test ${{ matrix.year }} |
| 45 | + uses: fx31337/mql-tester-action@master |
68 | 46 | with:
|
69 |
| - BtDeposit: 100000 |
70 |
| - BtDest: ${{ github.workspace }}/_results |
71 |
| - BtMonths: ${{ matrix.month }} |
72 |
| - BtYears: ${{ matrix.year }} |
73 |
| - OptFormatBrief: true |
74 |
| - OptFormatJson: true |
75 |
| - OptVerbose: true |
76 |
| - TestExpert: "Stg_ZigZag" |
| 47 | + Login: ${{ secrets.MT5_LOGIN }} |
| 48 | + Password: ${{ secrets.MT5_PASSWORD }} |
| 49 | + Server: MetaQuotes-Demo |
| 50 | + TestDeposit: 2000 |
| 51 | + TestExpert: ${{ matrix.file }}.ex5 |
| 52 | + TestFromDate: ${{ matrix.year }}.01.01 |
77 | 53 | TestPeriod: M1
|
78 |
| - TestReportName: Report-${{ matrix.year }}-${{ matrix.month }} |
79 |
| - - name: Upload results |
80 |
| - uses: actions/upload-artifact@v2 |
81 |
| - with: |
82 |
| - name: results |
83 |
| - path: ${{ github.workspace }}/_results/*.* |
| 54 | + TestSymbol: EURUSD |
| 55 | + TestToDate: ${{ matrix.year }}.01.14 |
| 56 | + # yamllint disable-line rule:line-length |
| 57 | + UrlExpert: file://${{ github.workspace }}/${{ matrix.file }}.ex5 |
| 58 | + Version: 5 |
0 commit comments