Skip to content

Commit

Permalink
Merge branch 'edit-yml-edh' into 'main'
Browse files Browse the repository at this point in the history
Edit yml to only build documentation when merging to main

See merge request water/computational-tools/surface-water-work/hyswap!85
  • Loading branch information
ehinman committed Jul 22, 2024
2 parents 6dd36c4 + 94fb9b8 commit 68b3ed4
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ image: ${ARTIFACTORY_URL}/docker-official-mirror/python:3.11

stages:
- build
- test
- test-package
- test-docs
- deploy
- validate

Expand All @@ -17,15 +18,14 @@ Build Package:
- pip install .

Test and Lint:
stage: test
stage: test-package
script:
# Install dependencies
- apt-get update -y
- apt-get upgrade -y
- apt-get install -y xdg-utils
- apt-get install -y lynx
- apt-get install -y graphviz
- apt-get install -y pandoc
- python -m pip install --upgrade pip
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
Expand All @@ -40,14 +40,34 @@ Test and Lint:
# Run pydeps
- pydeps hyswap -T png --max-bacon=3 --cluster
- mv hyswap.png docs/source/reference/hyswap.png # move pydeps graph to docs
artifacts:
paths:
- htmlcov/
- docs/build/
coverage: '/TOTAL.*\s+(\d+\%)/'

Test Documentation:
stage: test-docs
script:
# Install dependencies
- apt-get update -y
- apt-get upgrade -y
- apt-get install -y xdg-utils
- apt-get install -y lynx
- apt-get install -y graphviz
- apt-get install -y pandoc
- python -m pip install --upgrade pip
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- pip install .
# Test and build documentation
- cd docs
- make docs
artifacts:
paths:
- htmlcov/
- docs/build/
coverage: '/TOTAL.*\s+(\d+\%)/'
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'

Deploy Documentation:
image: ${ARTIFACTORY_URL}/docker-official-mirror/rocker/shiny-verse:4.1.2
Expand All @@ -64,7 +84,6 @@ Deploy Documentation:
rules:
- if: '$CI_COMMIT_BRANCH == "main" && $CONNECT_API_KEY != null && $CONNECT_SERVER != null'


Validate Inventory:
stage: validate
image: ${INTERNAL_REGISTRY}software/software-management:latest
Expand Down

0 comments on commit 68b3ed4

Please sign in to comment.