gitlab-ci: Run lint, build and install

.gitlab-ci.yml:
Add rule to run `make lint` if `keyringctl` changes in a merge request.
Add integration stage to always attempt to build and install the keyring
in a containerized environment.
This commit is contained in:
David Runge 2021-10-17 01:03:44 +02:00 committed by Levente Polyak
parent 153ae31437
commit 5e6a8a2e98
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8

View File

@ -1,7 +1,9 @@
---
image: archlinux:latest
stages:
- lint
- integration
variables:
PACMAN_CACHE: "${CI_PROJECT_DIR}/.pacman/pkg"
@ -24,3 +26,33 @@ check-new-key:
changes:
- master-keyids
- packager-keyids
lint:
stage: lint
before_script:
- install -d "${PACMAN_CACHE}"
- pacman -Syu --needed --noconfirm --cachedir "${PACMAN_CACHE}" make flake8 mypy python-black python-isort
script:
- make lint
only:
refs:
- merge_requests
changes:
- keyringctl
build_install:
stage: integration
before_script:
- install -d "${PACMAN_CACHE}"
- pacman -Syu --needed --noconfirm --cachedir "${PACMAN_CACHE}" make python sequoia-sq
script:
- ./keyringctl import-main master/
- ./keyringctl import-main master-revoked/
- ./keyringctl import-packager packager/
- ./keyringctl import-packager packager-revoked/
- make
- make install PREFIX=/usr
- pacman-key --init
- pacman-key --populate archlinux
- pacman-key --updatedb
- pacman -Syu