From 24bae6e0b70b794562f5df861497baefc965d8a9 Mon Sep 17 00:00:00 2001 From: Alec Kojaev Date: Tue, 10 Oct 2023 20:40:30 +0300 Subject: [PATCH] Add GitLab CI. --- .gitlab-ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ phpunit.xml | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..d0ca0f2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,38 @@ +image: debian:bookworm-slim + +stages: + - test + - deploy + +before_script: + - apt-get update -yqq + - apt-get install -yqq git make composer librsvg2-bin netpbm php-xdebug php-sqlite3 php-curl php-xml php-mbstring php-json php-zip php-intl + +test-job: + stage: test + script: + - composer update + - composer tests + artifacts: + reports: + coverage_report: + coverage_format: cobertura + path: .coverage/cobertura.xml + untracked: false + when: on_success + expire_in: 30 days + +deploy-job: + stage: deploy + only: + - tags + script: + - composer update --no-dev + - ./generate-icon.sh + - make appstore + artifacts: + paths: + - build/artifacts/appstore/calibre_opds.tar.gz + untracked: false + when: on_success + expire_in: 30 days diff --git a/phpunit.xml b/phpunit.xml index 7ed6e0c..204a984 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -21,7 +21,7 @@ - +