108 lines
2.8 KiB
YAML
108 lines
2.8 KiB
YAML
variables:
|
|
GITLBAB_TOKEN: $linmobapps
|
|
APPS_REF: master
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
cache:
|
|
paths:
|
|
- .cache/pip
|
|
|
|
check_formatting:
|
|
stage: test
|
|
image: python
|
|
script:
|
|
- cd ${CI_PROJECT_DIR}/checkers
|
|
- python3 -m pip install black
|
|
- black --line-length=200 *.py
|
|
- |
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
echo 'Git directory dirty. Please run "black --line-length=200 *.py".'
|
|
exit 1
|
|
fi
|
|
|
|
check_filename:
|
|
stage: test
|
|
image: python
|
|
script:
|
|
- cd ${CI_PROJECT_DIR}/checkers
|
|
- python3 -m pip install -r requirements.txt
|
|
- python3 ./check_filename.py check ${CI_PROJECT_DIR}/content/apps
|
|
|
|
check_schema:
|
|
stage: test
|
|
image: python
|
|
script:
|
|
- cd ${CI_PROJECT_DIR}/checkers
|
|
- python3 -m pip install -r requirements.txt
|
|
- python3 ./check_via_schema.py check ${CI_PROJECT_DIR}/content/apps
|
|
|
|
check_links:
|
|
stage: test
|
|
image: python
|
|
script:
|
|
- cd ${CI_PROJECT_DIR}/checkers
|
|
- python3 -m pip install -r requirements.txt
|
|
- python3 ./check_links.py check ${CI_PROJECT_DIR}/content/apps
|
|
when: manual
|
|
|
|
check_appstream:
|
|
stage: test
|
|
image: python
|
|
script:
|
|
- cd ${CI_PROJECT_DIR}/checkers
|
|
- python3 -m pip install -r requirements.txt
|
|
- python3 ./check_via_appstream.py check ${CI_PROJECT_DIR}/content/apps
|
|
when: manual
|
|
|
|
check_flathub:
|
|
stage: test
|
|
image: python
|
|
script:
|
|
- cd ${CI_PROJECT_DIR}/checkers
|
|
- python3 -m pip install -r requirements.txt
|
|
- python3 ./check_via_flathub.py check ${CI_PROJECT_DIR}/content/apps
|
|
when: manual
|
|
|
|
check_git:
|
|
stage: test
|
|
image: python
|
|
script:
|
|
- cd ${CI_PROJECT_DIR}/checkers
|
|
- python3 -m pip install -r requirements.txt
|
|
- python3 ./check_via_git.py check ${CI_PROJECT_DIR}/content/apps
|
|
when: manual
|
|
|
|
check_repology:
|
|
stage: test
|
|
image: python
|
|
script:
|
|
- cd ${CI_PROJECT_DIR}/checkers
|
|
- python3 -m pip install -r requirements.txt
|
|
- python3 ./check_via_repology.py check ${CI_PROJECT_DIR}/content/apps
|
|
when: manual
|
|
|
|
check_heuristics:
|
|
stage: test
|
|
image: python
|
|
script:
|
|
- cd ${CI_PROJECT_DIR}/checkers
|
|
- python3 -m pip install -r requirements.txt
|
|
- python3 ./check_via_heuristics.py check ${CI_PROJECT_DIR}/content/apps
|
|
when: manual
|
|
|
|
pages:
|
|
stage: deploy
|
|
image: alpine:latest
|
|
script:
|
|
- apk add --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ zola
|
|
- apk add --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ brotli
|
|
- zola build
|
|
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\|xml\|csv\)$' -exec gzip -f -k {} \;
|
|
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\|xml\|csv\)$' -exec brotli -f -k {} \;
|
|
- ls public
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- main
|