/ .gitlab-ci.yml
.gitlab-ci.yml
1 stages: 2 - quality 3 - test 4 5 cache: 6 paths: 7 - .basher 8 9 .job_template: &job_definition 10 variables: 11 BASHER_ROOT: $CI_PROJECT_DIR/.basher 12 before_script: 13 - apk add --no-cache make git 14 - git clone --depth=1 https://github.com/basherpm/basher "$BASHER_ROOT" || true 15 - export PATH="$BASHER_ROOT/bin:$PATH" 16 - eval "$(basher init -)" 17 - basher install bats-core/bats-core 18 - basher install ztombol/bats-assert 19 - basher install ztombol/bats-support 20 - basher link "$(pwd)" "shellm/cover" 21 22 .quality_template: &quality_definition 23 <<: *job_definition 24 image: bash:4.4 25 stage: quality 26 27 style: 28 <<: *quality_definition 29 script: 30 - apk add --no-cache xz 31 - wget -q -O - https://storage.googleapis.com/shellcheck/shellcheck-stable.linux.x86_64.tar.xz | tar xJ 32 - mv shellcheck-stable/shellcheck /usr/bin/shellcheck 33 - rm -rf shellcheck-stable 34 - make check-style 35 36 documentation: 37 <<: *quality_definition 38 script: 39 - make check-documentation 40 41 .test_template: &test_definition 42 <<: *job_definition 43 stage: test 44 script: 45 - make test 46 47 bash-4.3: 48 <<: *test_definition 49 image: bash:4.3 50 51 bash-4.4: 52 <<: *test_definition 53 image: bash:4.4 54 55 bash-5.0: 56 <<: *test_definition 57 image: bash:5.0-beta