BlueGit

projects-timfalken-com verhalenboek

Files

verhalenboek / .gitlab-ci.yml

.gitlab-ci.yml

feat: maak Verhalenboek installeerbaar als webapp
timfa project_87242033_bot_b167a9be22027ad5a4b431d0ad8426c6 · pushed by timfa · 6 weeks ago
944696d3 History
.gitlab-ci.yml 1.5 KiB Download Raw
1stages:
2 - test
3 - deploy
4
5php_tests:
6 stage: test
7 image: php:8.3-cli-bookworm
8 before_script:
9 - apt-get update -qq
10 - apt-get install -y --no-install-recommends python3 libonig-dev
11 - docker-php-ext-install mbstring
12 script:
13 - find web -name '*.php' -not -path '*/artifacts/*' -print0 | xargs -0 -n1 php -l
14 - php -r 'foreach (["pdo_sqlite", "curl", "mbstring", "openssl"] as $extension) { if (!extension_loaded($extension)) { fwrite(STDERR, "Missing extension " . $extension); exit(1); } }'
15 - php web/tests/storybook.php
16 - python3 web/tests/startup.py
17 - python3 web/tests/integration.py
18 - python3 web/tests/pwa.py
19
20frontend_checks:
21 stage: test
22 image: node:22-bookworm-slim
23 script:
24 - node --check web/assets/app.js
25 - node --check web/assets/pwa.js
26 - node --check web/sw.js
27
28# A real FTP fixture verifies that mirroring preserves production data and secrets.
29deploy_tests:
30 stage: test
31 image: debian:bookworm-slim
32 before_script:
33 - apt-get update -qq
34 - apt-get install -y --no-install-recommends python3 python3-pyftpdlib lftp ca-certificates openssh-client
35 script:
36 - python3 ci/test_deploy.py
37
38ftp_upload:
39 stage: deploy
40 image: debian:bookworm-slim
41 resource_group: production
42 environment:
43 name: production
44 rules:
45 - if: '$CI_COMMIT_BRANCH == "master"'
46 before_script:
47 - apt-get update -qq
48 - apt-get install -y --no-install-recommends python3 lftp ca-certificates openssh-client
49 script:
50 - python3 ci/deploy.py