feature(keyringctl): adding basic infrastructure for running tests

This commit is contained in:
Levente Polyak
2021-10-31 18:53:20 +01:00
parent 8ba7dc1dc9
commit 0ca74e243b
8 changed files with 299 additions and 37 deletions

View File

@ -2,49 +2,39 @@
image: archlinux:latest
stages:
- lint
- integration
variables:
PACMAN_CACHE: "${CI_PROJECT_DIR}/.pacman/pkg"
cache:
paths:
- .pacman/pkg
key: ${CI_JOB_NAME}
check-new-key:
stage: lint
needs: []
script:
- install -d "${PACMAN_CACHE}"
- pacman -Syu --needed --noconfirm --cachedir "${PACMAN_CACHE}" git grep hopenpgp-tools sequoia-keyring-linter
- ./.gitlab/check-keyids-change
only:
refs:
- merge_requests
changes:
- master-keyids
- packager-keyids
- test
lint:
stage: lint
stage: test
needs: []
before_script:
- install -d "${PACMAN_CACHE}"
- pacman -Syu --needed --noconfirm --cachedir "${PACMAN_CACHE}" make flake8 mypy python-black python-isort
- pacman -Syu --needed --noconfirm make flake8 mypy python-black python-isort
script:
- make lint
only:
refs:
- merge_requests
changes:
- keyringctl
- libkeyringctl/*
- test/*
test:
stage: test
needs: []
before_script:
- pacman -Syu --needed --noconfirm make python sequoia-sq python-pytest
script:
- make test
only:
changes:
- keyringctl
- libkeyringctl/*
- test/*
build_install:
stage: integration
stage: test
needs: []
before_script:
- install -d "${PACMAN_CACHE}"
- pacman -Syu --needed --noconfirm --cachedir "${PACMAN_CACHE}" make python sequoia-sq
- pacman -Syu --needed --noconfirm make python sequoia-sq
script:
- ./keyringctl import --main master master-revoked
- ./keyringctl import packager packager-revoked