Skip to content

Commit

Permalink
Converts action to composite
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Feb 17, 2024
1 parent 4f28b25 commit b34e3da
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 62 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/docker.yml

This file was deleted.

9 changes: 0 additions & 9 deletions Dockerfile

This file was deleted.

51 changes: 16 additions & 35 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,38 +94,19 @@ name: EA Tester
# foo: # id of output
# description: 'Foo'
runs:
using: docker
image: Dockerfile
env:
BT_CURRENCY: ${{ inputs.BtCurrency }}
BT_DAYS: ${{ inputs.BtDays }}
BT_DEPOSIT: ${{ inputs.BtDeposit }}
BT_DEST: ${{ inputs.BtDest }}
BT_DIGITS: ${{ inputs.BtDigits }}
BT_MONTHS: ${{ inputs.BtMonths }}
BT_PERIOD: ${{ inputs.TestPeriod }}
BT_SPREAD: ${{ inputs.BtSpread }}
BT_SYMBOL: ${{ inputs.BtPair }}
BT_TESTMODEL: ${{ inputs.BtTestModel }}
BT_YEARS: ${{ inputs.BtYears }}
GITHUB_API_TOKEN: ${{ inputs.GitHubApiToken }}
EA_OPTS: ${{ inputs.TestLimitOpts }}
OPT_FORMAT_BRIEF: ${{ inputs.OptFormatBrief }}
OPT_FORMAT_JSON: ${{ inputs.OptFormatJson }}
OPT_OPTIMIZATION: ${{ inputs.OptOptimize }}
OPT_TRACE: ${{ inputs.OptTrace }}
OPT_VERBOSE: ${{ inputs.OptVerbose }}
RUN_ON_ERROR: ${{ inputs.RunOnError }}
RUN_ON_EXIT: ${{ inputs.RunOnExit }}
RUN_ON_FAIL: ${{ inputs.RunOnFail }}
RUN_ON_SET: ${{ inputs.RunOnSet }}
RUN_ON_START: ${{ inputs.RunOnStart }}
RUN_ON_SUCCESS: ${{ inputs.RunOnSuccess }}
RUN_ON_WARN: ${{ inputs.RunOnWarning }}
SCRIPT: ${{ inputs.Script }}
SETFILE: ${{ inputs.SetFile }}
SET_OPTS: ${{ inputs.SetOpts }}
SET_PARAMS: ${{ inputs.SetParams }}
TEST_EXPERT: ${{ inputs.TestExpert }}
TEST_REPORT_NAME: ${{ inputs.TestReportName }}
WORKDIR: /github/workspace
steps:
- name: Runs playbook
uses: dawidd6/action-ansible-playbook@v2
with:
configuration: |
[defaults]
nocows = false
stdout_callback = yaml
directory: ansible
options: |
--connection local
--inventory localhost,
--verbose
playbook: run-test.yml
# requirements: galaxy-requirements.yml
using: composite
24 changes: 24 additions & 0 deletions ansible/run-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
- name: Run test
hosts: all
tasks:
- name: Include main role
ansible.builtin.import_role:
name: ea31337.mt_runner
vars:
mt_runner_bt_mt5_config:
Common:
Server: MetaQuotes-Demo
Tester:
Deposit: 10000
ExecutionMode: 0
Expert: Advisors\Dummy.ex5
FromDate: 2024.01.01
Leverage: 1:500
Login: 12345
Model: 1
Report: report.html
ReplaceReport: 1
ShutdownTerminal: 1
Symbol: EURUSD
ToDate: 2024.01.11

0 comments on commit b34e3da

Please sign in to comment.