Skip to content

Commit

Permalink
GHA: Refactors Test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Feb 18, 2024
1 parent 05638f8 commit bb0083b
Showing 1 changed file with 13 additions and 51 deletions.
64 changes: 13 additions & 51 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,67 +22,29 @@ on:

jobs:

Compile:
defaults:
run:
shell: powershell
working-directory: src
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
submodules: recursive
- name: List MQL files
run: '(Get-ChildItem -Recurse -Path . -Include *.mq[45]).fullname'
shell: powershell
- name: Compiles EA (MQL4)
uses: fx31337/mql-compile-action@master
with:
path: src\EA31337-Libre.mq4
verbose: true
compile:
name: Compile
uses: .github/workflows/compile.yml@dev-v3000

- name: Compiles EA (MQL5)
uses: fx31337/mql-compile-action@master
with:
path: src\EA31337-Libre.mq5
verbose: true
- name: List compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: EA
path: 'src/*.ex?'

Test:
test:

defaults:
run:
shell: bash

needs: Compile
name: Test
needs: compile
runs-on: ubuntu-latest

strategy:
matrix:
month: [1, 2]
year: [2020]

steps:

- uses: actions/download-artifact@v2
with:
name: EA
name: EA-Libre.ex?
path: .

- name: Test ${{ matrix.year }}.${{ matrix.month }}
uses: fx31337/mql-tester-action@master
- name: Run test
uses: fx31337/mql-tester-action@dev
with:
BtDeposit: 10000
BtDigits: 5
BtMonths: ${{ matrix.month }}
BtYears: ${{ matrix.year }}
RunOnError: 'show_logs && parse_results $@; exit 0'
TestExpert: EA31337-Libre
TestPeriod: M1
TestDeposit: 10000
TestExpert: EA31337-Libre.ex5
TestPeriod: M15

0 comments on commit bb0083b

Please sign in to comment.