.gitlab-ci.yml 929 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
stages:
  - Test
  - Static Analysis

variables:
  VENV_DIR: $CI_PROJECT_DIR/../venv-pyFstat
  INSTALLER_DIR: $CI_PROJECT_DIR/install-cw-software

pytest:
  stage: Test
  tags: [ pyFstat ]
  before_script:
    - python3 -m venv $VENV_DIR
    - source ${VENV_DIR}/bin/activate
    - pip install --upgrade pip
    - pip install -r requirements.txt
    - pip install lalsuite
    - pip install pytest
    - export LAL_DATA_PATH=$HOME/ephemeris
    - export LALPULSAR_DATADIR=$LAL_DATA_PATH

Gregory Ashton's avatar
Gregory Ashton committed
22
  script:
23 24 25 26 27 28 29 30 31 32 33
    - pip install -e $CI_PROJECT_DIR
      # make sure to test *installed* version of pyFstat
    - (cd .. && pytest $CI_PROJECT_DIR/tests.py --log-file=$CI_PROJECT_DIR/tests.log)

  artifacts:
    paths:
      - ./*.log
    name: testlogs
    when: always
    expire_in: 24h

34
static:
35
  stage: Static Analysis
36
  tags: [ pyFstat ]
37 38 39 40
  script:
    - source ${VENV_DIR}/bin/activate
    - black --check .
    # - flake8 .  ## not ready