# Includes a common template
include:
 - project: 'spc/tcv/tbx/git-tools-spc'
   file: 'gitlab-ci-tbx-template.yml'

variables:
  TBXFOLDER: matlab
  MATFIRST: 803
  MATVER: 906

# no build for gdat, so don't define jobs for build phase

# test jobs
test-matlab-8.5.0:
  extends: .test-template
  variables:
    MATLABCMD: matlab850
    TESTCASE: basic-tcv

test-matlab-9.2.0:
  extends: .test-template
  variables:
    MATLABCMD: matlab920
    TESTCASE: basic-tcv

test-matlab-9.6.0:
  extends: .test-template
  tags:
  - lac8-gituser
  variables:
    MATLABCMD: matlab960
    TESTCASE: basic-tcv

test-matlab-8.5.0-all:
  extends: test-matlab-8.5.0
  variables:
     TESTCASE: all
  only:
  - schedules
  - web

test-matlab-9.6.0-all:
  extends: test-matlab-9.6.0
  variables:
     TESTCASE: all
  only:
  - schedules
  - web

# Staging, testing and deployment for releases
pre-deployment-staging:
 extends: .staging-template

# Staging tests

test-staging-960:
 extends: .test-staging-template
 variables:
  MATLABCMD: matlab960

test-staging-920:
 extends: .test-staging-template
 variables:
  MATLABCMD: matlab920

test-staging-900:
 extends: .test-staging-template
 variables:
  MATLABCMD: matlab900

# pre-deployment
pre-deployment-checks:
 extends: .pre-deployment-checks-template

# deploy
deploy:
  extends: .deploy-to-lac-template

# test post-deploy
test-post-deploy-matlab-9.2.0:
  extends: .test-post-deploy-template
  variables:
    MATLABCMD: matlab920
    TESTCASE: basic-tcv

test-post-deploy-matlab-8.5.0:
  extends: .test-post-deploy-template
  variables:
    MATLABCMD: matlab850
    TESTCASE: basic-tcv
