default:
    image: rboman/waves-py3:2022.0

.global_tag: &global_tag_def
    tags:
        - mn2l

variables:
    GIT_SUBMODULE_STRATEGY: recursive
    GIT_STRATEGY: clone # workaround full clone for each pipeline (https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26993)
    GIT_LFS_SKIP_SMUDGE: 1 # do not pull LFS

stages:
    - build
    - test

build:
    <<: *global_tag_def
    stage: build
    script:
        - wget https://bootstrap.pypa.io/get-pip.py
        - python3 get-pip.py
        - python3 -m pip install .

test:
    <<: *global_tag_def
    stage: test
    script:
        - for f in tests/*.py; do python3 run.py "$f"; done
    dependencies:
        - build
