Files
website/.gitlab-ci.yml
Jon Lockwood 927a97c913 ci(gitlab-ci): updated to new commit for markdown lint to work
markdown lint had a bug where it would not discover markdown files.
bug was fixed in commit 'f6d7ebeeb2b9d643c37ccbe6e25fa8d7e9dd970d'
gitlab-ci updated to use this commit.

MR !7
2022-01-31 10:36:36 +09:30

100 lines
2.2 KiB
YAML

stages:
- validation
- build
- deploy
- test
- release
- publish
variables:
GIT_SUBMODULE_STRATEGY: recursive
MY_PROJECT_ID: "13001358"
include:
- project: nofusscomputing/projects/gitlab-ci
ref: f6d7ebeeb2b9d643c37ccbe6e25fa8d7e9dd970d
file:
- conventional_commits/.gitlab-ci.yml
- mkdocs/.gitlab-ci.yml
- validation/.gitlab-ci.yml
- gitlab_release/.gitlab-ci.yml
Lint Markdown:
extends: .Lint_Markdown
Static Pages:
extends: .MKDocs_Build
needs: [ 'Lint Markdown' ]
pages:
stage: deploy
variables:
GIT_STRATEGY: none
script:
- mv "$CI_PROJECT_DIR/artifacts/build/Static Pages/build" public
needs: [ 'Static Pages' ]
environment:
name: staging
url: $CI_PAGES_URL
artifacts:
paths:
- public
rules:
- if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != "master"'
when: always
- when: never
.Pytest_template:
stage: test
image: ubuntu:18.04
before_script:
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME"
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests"
- apt update
- apt install -y python3 python3-pip ca-certificates
- apt install --no-install-recommends -y chromium-chromedriver
- pip3 install --upgrade pip
- pip3 install -r test/requirements.txt
artifacts:
expire_in: 24 hrs
when: always
paths:
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/*"
reports:
junit:
- "*.junit.xml"
rules:
- if: '$CI_COMMIT_BRANCH'
when: always
- when: never
Unit Tests:
extends: .Pytest_template
needs: [ 'Static Pages' ]
script:
- mv "$CI_PROJECT_DIR/artifacts/build/Static Pages/build" build
- pytest --verbose --junitxml=unit_test.junit.xml --tb=line test/unit
- cp *.junit.xml "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/"
- echo "[DEBUG] python_exit[$python_exit]"
#Integration Tests:
# extends: .Pytest_template
# needs:
# - pages
# - 'Unit Tests'
# script:
# - echo "placeholder job for integration tests" > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/DETEMEME.txt"
Gitlab Release:
extends:
- .gitlab_release