Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit a8b9038

Browse files
authored
Merge pull request #2 from Lendable/feat/more-expressions
feat: more expressions
2 parents c523a58 + 7af3276 commit a8b9038

File tree

151 files changed

+2831
-301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+2831
-301
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ trim_trailing_whitespace = true
1414
[*.md]
1515
trim_trailing_whitespace = false
1616

17+
[{*.yml, *.yaml}]
18+
indent_size = 2
19+

.gitlab-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include:
2+
- local: '/.gitlab/_include.yml'

.gitlab/_include.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include:
2+
- local: '/.gitlab/global.yml'
3+
- local: '/.gitlab/stages/_include.yml'

.gitlab/global.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
stages:
2+
- test
3+
4+
variables:
5+
DOCKER_DRIVER: overlay2
6+
DOCKER_BUILDKIT: 1
7+
8+
TIMEZONE: "Europe/Amsterdam" # For the system in general
9+
TZ: ${TIMEZONE} # For mysql
10+
DATE_TIMEZONE: ${TIMEZONE} # For PHP
11+
ARTIFACT_OUT_PATH: 'var/ci-out'

.gitlab/stages/010-test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
test-php-7.1:
2+
extends: .test
3+
variables:
4+
IMAGE: hgraca/full-php-7.1-fpm-alpine:ci-latest
5+
6+
test-php-7.2:
7+
extends: .test
8+
variables:
9+
IMAGE: hgraca/full-php-7.2-fpm-alpine:ci-latest
10+
11+
test-php-7.3:
12+
extends: .test
13+
variables:
14+
IMAGE: hgraca/full-php-7.3-fpm-alpine:ci-latest
15+
16+
test-php-7.4:
17+
extends: .test
18+
variables:
19+
IMAGE: hgraca/full-php-7.4-fpm-alpine:ci-latest
20+
21+
test-php-8.0:
22+
extends: .test
23+
variables:
24+
IMAGE: hgraca/full-php-8.0-fpm-alpine:ci-latest
25+
26+
test-php-8.1:
27+
extends: .test
28+
variables:
29+
IMAGE: hgraca/full-php-8.1-fpm-alpine:ci-latest
30+
31+
test-php-8.2:
32+
extends: .test
33+
variables:
34+
IMAGE: hgraca/full-php-8.2-fpm-alpine:ci-latest

.gitlab/stages/_include.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include:
2+
- local: '/.gitlab/stages/jobs/_include.yml'
3+
- local: '/.gitlab/stages/rules/_include.yml'
4+
- local: '/.gitlab/stages/010-test.yml'

.gitlab/stages/jobs/_include.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include:
2+
- local: '/.gitlab/stages/jobs/test.yml'

.gitlab/stages/jobs/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.test:
2+
image: ${IMAGE}
3+
stage: test # Must be overwritten in a child job
4+
# rules: # The rules are set on the 'concrete' job, as the concrete jobs can have different rules
5+
interruptible: true # allows to stop the job if a newer pipeline starts, saving resources and allowing new jobs to start because job concurrency is limited
6+
rules:
7+
- !reference [ .is_mr, rules ]
8+
dependencies: [] # don't pull any artifacts
9+
cache: [] # Don't pull any cache
10+
artifacts:
11+
name: "artifact-coverage-pipeline-${CI_PIPELINE_ID}"
12+
expire_in: 24 hours # So we can use and download these during the next day, and because they don't take much space in the server
13+
paths:
14+
- var/coverage.clover.xml
15+
# - var/tests.junit.xml
16+
# reports: # enable this when we have >=PHP7.3 & >=PHPUnit9.4
17+
# coverage_report:
18+
# coverage_format: cobertura
19+
# path: var/coverage.cobertura.xml
20+
# junit: var/tests.junit.xml
21+
coverage: '/^\s*Lines:\s*\d+.\d+\%/'
22+
script:
23+
- composer validate
24+
- composer install --prefer-dist
25+
- PHP_CS_FIXER_IGNORE_ENV=1 ./bin/php-cs-fixer fix --dry-run -v
26+
- ./bin/psalm
27+
- ./bin/phpunit -d memory_limit=-1 --coverage-clover var/coverage.clover.xml

.gitlab/stages/rules/_include.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include:
2+
- local: '/.gitlab/stages/rules/is_merged.yml'
3+
- local: '/.gitlab/stages/rules/is_merged_and_has_changes.yml'
4+
- local: '/.gitlab/stages/rules/is_mr.yml'
5+
- local: '/.gitlab/stages/rules/is_mr_and_has_changes.yml'
6+

.gitlab/stages/rules/is_merged.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.is_merged:
2+
rules:
3+
- if: '$MANUAL_PIPELINE == "false" && $CI_DEFAULT_BRANCH == $CI_COMMIT_BRANCH'

0 commit comments

Comments
 (0)