-
Notifications
You must be signed in to change notification settings - Fork 107
91 lines (76 loc) · 2.75 KB
/
pimcore-skeleton.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Test Pimcore Skeleton
on:
pull_request:
branches:
- "[0-9]+.[0-9]+"
- "[0-9]+.x"
push:
branches:
- "[0-9]+.[0-9]+"
- "[0-9]+.x"
- "*_actions"
jobs:
test-pimcore-skeleton:
runs-on: ubuntu-latest
steps:
# Check out the repo in a sub-dir to see if it can serve as
# teplate for `composer create-project`
# See: https://github.com/actions/checkout#usage
- uses: actions/checkout@v2
with:
path: 'skeleton'
- name: Pull latest pimcore image
run: |
# Echo commands and terminate on first error
set -ex
# Pull latest build of pimcore's image
docker pull docker.io/pimcore/pimcore:php8.2-latest
- name: Create project from skeleton in latest pimcore environment
run: |
# Echo commands and terminate on first error
set -ex
# Try creating a new project with composer using contents of this repo as the package.
# We execute composer within docker container to suttisfy platform requirements.
# The value of ´"url":` must match checkout path in the first step.
#
# See: https://getcomposer.org/doc/03-cli.md#create-project
# See: https://getcomposer.org/doc/05-repositories.md#path
docker run \
--volume=${{ github.workspace }}/:/test/ \
--workdir=/test/ \
--user=$(id -u):$(id -g) \
docker.io/pimcore/pimcore:php8.2-latest \
composer create-project \
pimcore/skeleton:@dev \
--repository='{"type": "path", "url": "./skeleton"}' \
sample-project
- name: Smoke-test compose file
run: |
# Echo commands and terminate on first error
set -ex
# Check (lint) the compose file
docker compose version
cd sample-project/
docker compose config -q
- name: Test pimcore installation
run: |
# Echo commands and terminate on first error
set -ex
cd sample-project/
# Start containers
docker compose pull --quiet
docker compose up -d
# Run pimcore installation.
docker compose exec -T \
-e PIMCORE_INSTALL_ADMIN_USERNAME=pimcore \
-e PIMCORE_INSTALL_ADMIN_PASSWORD=pimcore \
-- \
php vendor/bin/pimcore-install -n
- name: Run codeception tests
run: |
# Echo commands and terminate on first error
set -ex
cd sample-project/
# Set up and execute codeception tests, just like README.md suggests.
docker compose run --rm -T test-php vendor/bin/pimcore-install -n
docker compose run --rm -T test-php vendor/bin/codecept run -vv