GitHub workflow changes to avoid testing if "MT5_LOGIN" env variable … #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
name: Test Indicators (Oscillator) | ||
env: | ||
TEST_PATH: Indicators/Oscillator/tests | ||
TEST_SKIP: ${{ secrets.MT5_LOGIN == '' }} | ||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/test-indicators-oscillator.yml | ||
- Indicator/** | ||
- Indicators/Oscillator/** | ||
push: | ||
paths: | ||
- .github/workflows/test-indicators-oscillator.yml | ||
- Indicator/** | ||
- Indicators/Oscillator/** | ||
jobs: | ||
compile: | ||
name: Compile | ||
uses: ./.github/workflows/compile-mql.yml | ||
with: | ||
artifact_prefix: mt | ||
path: Indicators/Oscillator/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: | ||
- Indi_MACD.test | ||
- Indi_RSI.test | ||
- Indi_Stochastic.test | ||
- Indi_WPR.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" }} | ||
Check failure on line 54 in .github/workflows/test-indicators-oscillator.yml GitHub Actions / Test Indicators (Oscillator)Invalid workflow file
|
||
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 |