Skip to content
Snippets Groups Projects

ci: add basic integration test for pmb

Merged Clayton Craft requested to merge craftyguy/ci_integration_test into master
All threads resolved!
1 file
+ 0
78
Compare changes
  • Side-by-side
  • Inline
+ 0
78
@@ -16,86 +16,8 @@ before_script: &global_before_scripts
- "adduser -D build"
stages:
- lint
- deploy
- test
codespell:
stage: lint
script:
- ".ci/codespell.sh"
pytest:
stage: test
script:
- "apk -q add git"
- "su build -c 'git config --global user.email ci@ci'"
- "su build -c 'git config --global user.name CI'"
- "echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
- ".ci/pytest.sh"
after_script:
- "cp /home/build/.local/var/pmbootstrap/log_testsuite.txt ."
- "cp /home/build/.local/var/pmbootstrap/log.txt ."
artifacts:
when: on_failure
paths:
- "log_testsuite.txt"
- "log.txt"
ruff:
stage: lint
script:
- ".ci/ruff.sh"
shellcheck:
stage: lint
script:
- ".ci/shellcheck.sh"
vermin:
stage: lint
script:
- ".ci/vermin.sh"
mr-settings:
stage: lint
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
before_script:
- *global_before_scripts
- "apk -q add python3"
- "wget -q 'https://gitlab.com/postmarketOS/ci-common/-/raw/master/check_mr_settings.py'"
script:
- "python3 ./check_mr_settings.py"
mypy:
stage: lint
script:
- ".ci/mypy.sh"
docs:
stage: lint
script:
- ".ci/docs.sh"
artifacts:
paths:
- public
deploy:
only:
- master
stage: deploy
before_script:
- apk -q add openssh-client rsync
script:
- mkdir "${HOME}/.ssh"
- echo "${SSH_HOST_KEY}" > "${HOME}/.ssh/known_hosts"
- echo "${SSH_PRIVATE_KEY}" > "${HOME}/.ssh/id_ed25519"
- chmod 700 "${HOME}/.ssh/id_ed25519"
- rsync -hrvz --delete -e "ssh -p ${SSH_PORT}" public/ "${SSH_HOST}":/var/www/docs.postmarketos.org/pmbootstrap/
environment:
name: deploy
integration:
stage: test
script:
Loading