### ----------------------------------------------------
### -- App::Racoco::Report::ReporterCoveralls
### -- Licenses: Artistic-2.0
### -- Authors: Mikhail Khorkov
### -- File: .gitlab-ci.yml
### ----------------------------------------------------
variables:
  ONLINE_TESTING: 1

# Only run on merge requests or changes to the default branch
workflow:
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
      when: always
      variables:
        COVERALLS_REPO_TOKEN: "$COVERALLS_REPO_TOKEN"
        RAKULIB: "./lib"
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
      when: always
      variables:
        COVERALLS_REPO_TOKEN: "$COVERALLS_REPO_TOKEN"
        RAKULIB: "./lib"
    - when: never

.script: &script
  - raku --version
  - apk add openssl-dev
  - zef install --/test App::Prove6
  - zef install --/test --deps-only .
  - racoco --reporter=coveralls

coverage:
  image: rakuland/raku:latest
  artifacts:
    paths:
      - public
  script: *script


