Skip to content
Snippets Groups Projects
Commit c5e0d0f5 authored by DarkLynx32's avatar DarkLynx32
Browse files

Testing build stage, added auto generation for sphinx, testing deployment

parent 77159dfb
No related branches found
No related tags found
1 merge request!19Updated GitLab pipeline, disabled deploy
Pipeline #91573 canceled
......@@ -17,9 +17,10 @@ image: python:3.8
stages:
- Lint
- Build
- Test
- Deploy
- Docs
- Documentation
# Make sure all dependencies are installed before each job
......@@ -33,7 +34,7 @@ before_script:
###############
# STAGE: lint #
# STAGE: Lint #
###############
PythonLint:
......@@ -45,10 +46,21 @@ PythonLint:
# Install linter
- pip install pycodestyle
# Run linter on LocalProjector
#- pycodestyle LocalProjector\
#- pycodestyle LocalProjector/
################
# STAGE: Build #
################
BuildLocalProjector:
stage: Build
script:
# Try to run program
- cd LocalProjector/
- python main.py -platform offscreen
###############
# STAGE: test #
# STAGE: Test #
###############
UnitTestPython:
......@@ -82,7 +94,7 @@ E2ETest:
- echo "E2E tests have yet to be integrated."
#################
# STAGE: deploy #
# STAGE: Deploy #
#################
LocalProjectorDeployment:
......@@ -98,22 +110,31 @@ LocalProjectorDeployment:
- ls -a
artifacts:
paths:
- dist/*.exe
- dist/*
expire_in: 1 week
# only:
# - master
only:
- master
###############
# STAGE: Docs #
###############
########################
# STAGE: Documentation #
########################
DocumentationSphinx:
stage: Docs
stage: Documentation
script:
# Install sphinx and ReadTheDocs theme
- pip install sphinx sphinx-rtd-theme
# Make a backups of pages that were customized after generation
- cd LocalProjector/
- mkdir backup-docs/source/
- cp docs/source/modules.rst backup-docs/source/
# Enter documentation folder
- cd LocalProjector/docs/
- cd docs/
# Auto generate pages for new scripts
# .md files should be done manually by using "m2r README_FILENAME.md"
- sphinx-apidoc -f -o source ../src/
# Add customized pages again which have been overwritten
- cp -R ../backup-docs/source/* ./source/
# Build documentation
- make html
# Move new documentation to seperate folder to be published
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment