Skip to content

Commit 1dc4fd3

Browse files
authored
Merge pull request #8 from maximehuran/feature/generate-test-application
Generate test application automatically
2 parents 5b0fc7b + f313f9f commit 1dc4fd3

File tree

111 files changed

+2383
-1212
lines changed

Some content is hidden

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

111 files changed

+2383
-1212
lines changed

.editorconfig

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
# Change these settings to your own preference
9+
indent_style = space
10+
indent_size = 4
11+
12+
# We recommend you to keep these unchanged
13+
end_of_line = lf
14+
charset = utf-8
15+
trim_trailing_whitespace = true
16+
insert_final_newline = true
17+
18+
[*.feature]
19+
indent_style = space
20+
indent_size = 4
21+
22+
[*.js]
23+
indent_style = space
24+
indent_size = 2
25+
26+
[*.json]
27+
indent_style = space
28+
indent_size = 2
29+
30+
[*.md]
31+
indent_style = space
32+
indent_size = 4
33+
trim_trailing_whitespace = false
34+
35+
[*.neon]
36+
indent_style = space
37+
indent_size = 4
38+
39+
[*.php]
40+
indent_style = space
41+
indent_size = 4
42+
43+
[*.sh]
44+
indent_style = space
45+
indent_size = 4
46+
47+
[*.{yaml,yml}]
48+
indent_style = space
49+
indent_size = 4
50+
trim_trailing_whitespace = false
51+
52+
[.babelrc]
53+
indent_style = space
54+
indent_size = 2
55+
56+
[.gitmodules]
57+
indent_style = tab
58+
indent_size = 4
59+
60+
[.php_cs{,.dist}]
61+
indent_style = space
62+
indent_size = 4
63+
64+
[composer.json]
65+
indent_style = space
66+
indent_size = 4
67+
68+
[package.json]
69+
indent_style = space
70+
indent_size = 2
71+
72+
[phpspec.yml{,.dist}]
73+
indent_style = space
74+
indent_size = 4
75+
76+
[phpstan.neon]
77+
indent_style = space
78+
indent_size = 4
79+
80+
[phpunit.xml{,.dist}]
81+
indent_style = space
82+
indent_size = 4
83+
84+
[Makefile]
85+
indent_style = tab

.github/workflows/recipe.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Flex Recipe
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
8+
jobs:
9+
10+
recipe:
11+
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
SYMFONY_ENDPOINT: http://127.0.0.1/
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
php: ['7.4' ,'8.0']
21+
sylius: ["~1.8.0", "~1.9.0", "~1.10.0"]
22+
exclude:
23+
- php: 8.0
24+
sylius: "~1.8.0"
25+
- php: 8.0
26+
sylius: "~1.9.0"
27+
28+
steps:
29+
- name: Setup PHP
30+
run: |
31+
sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
32+
echo "date.timezone=UTC" >> /tmp/timezone.ini
33+
sudo mv /tmp/timezone.ini /etc/php/${{ matrix.php }}/cli/conf.d/timezone.ini
34+
echo ${{ matrix.php }} > .php-version
35+
36+
- uses: actions/checkout@v2
37+
with:
38+
path: plugin
39+
40+
# Run the server at the start so it can download the recipes!
41+
- name: Run standalone symfony flex server
42+
run: |
43+
echo ${{ github.token }} | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
44+
docker run --rm --name flex -d -v $PWD/plugin/recipes:/var/www/flex/var/repo/private/monsieurbiz/sylius-sales-reports-plugin -p 80:80 docker.pkg.github.com/monsieurbiz/docker/symfony-flex-server:latest contrib official
45+
docker ps
46+
47+
- run: mkdir -p /home/runner/{.composer/cache,.config/composer}
48+
49+
- uses: actions/cache@v1
50+
id: cache-composer
51+
with:
52+
path: /home/runner/.composer/cache
53+
key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ github.sha }}
54+
restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-
55+
56+
- name: Composer v2
57+
run: sudo composer self-update --2
58+
59+
- name: Composer Github Auth
60+
run: composer config -g github-oauth.github.com ${{ github.token }}
61+
62+
- name: Create Sylius-Standard project without install
63+
run: |
64+
composer create-project --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard sylius "${{ matrix.sylius }}"
65+
66+
- name: Setup some requirements
67+
working-directory: ./sylius
68+
run: |
69+
composer config repositories.plugin '{"type": "path", "url": "../plugin/"}'
70+
composer config extra.symfony.allow-contrib true
71+
composer config secure-http false
72+
composer config --unset platform.php
73+
74+
- name: Require plugin without install
75+
working-directory: ./sylius
76+
run: |
77+
composer require --no-install --no-update monsieurbiz/sylius-sales-reports-plugin="*@dev"
78+
79+
- name: Composer install
80+
working-directory: ./sylius
81+
run: |
82+
composer install
83+
84+
- name: Show flex server logs
85+
run: docker logs --tail 100 flex

.github/workflows/security.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Security
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
9+
security:
10+
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php: ['7.4', '8.0']
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Setup PHP
22+
run: |
23+
sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
24+
echo "date.timezone=UTC" | sudo tee /etc/php/${{ matrix.php }}/cli/conf.d/timezone.ini
25+
echo "${{ matrix.php }}" > .php-version
26+
27+
- uses: actions/cache@v1
28+
id: cache-composer
29+
with:
30+
path: /home/runner/.composer/cache
31+
key: composer2-php:${{ matrix.php }}-${{ github.sha }}
32+
restore-keys: composer2-php:${{ matrix.php }}-
33+
34+
- run: mkdir -p /home/runner/{.composer/cache,.config/composer}
35+
if: steps.cache-composer.outputs.cache-hit != 'true'
36+
37+
- name: Composer v2
38+
run: sudo composer self-update --2
39+
40+
- name: Composer Github Auth
41+
run: composer config -g github-oauth.github.com ${{ github.token }}
42+
43+
- uses: actions/checkout@v2
44+
45+
- name: Install PHP dependencies
46+
run: composer update --prefer-dist
47+
48+
- uses: symfonycorp/security-checker-action@v2

.github/workflows/tests.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
8+
jobs:
9+
10+
php:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php: ['7.4', '8.0']
18+
19+
env:
20+
SYMFONY_ARGS: --no-tls
21+
COMPOSER_ARGS: --prefer-dist
22+
DOCKER_INTERACTIVE_ARGS: -t
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Setup PHP
28+
run: |
29+
sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
30+
echo "date.timezone=UTC" | sudo tee /etc/php/${{ matrix.php }}/cli/conf.d/timezone.ini
31+
echo "${{ matrix.php }}" > .php-version
32+
33+
- name: Install symfony CLI
34+
run: |
35+
curl https://get.symfony.com/cli/installer | bash
36+
echo "${HOME}/.symfony/bin" >> $GITHUB_PATH
37+
38+
- uses: actions/cache@v1
39+
id: cache-composer
40+
with:
41+
path: /home/runner/.composer/cache
42+
key: composer2-php:${{ matrix.php }}-${{ github.sha }}
43+
restore-keys: composer2-php:${{ matrix.php }}-
44+
45+
- run: mkdir -p /home/runner/{.composer/cache,.config/composer}
46+
if: steps.cache-composer.outputs.cache-hit != 'true'
47+
48+
- name: Composer v2
49+
run: sudo composer self-update --2
50+
51+
- name: Composer Github Auth
52+
run: composer config -g github-oauth.github.com ${{ github.token }}
53+
54+
- run: make install
55+
56+
- run: make test.composer
57+
58+
- run: make test.phpcs
59+
60+
- run: make test.phpunit
61+
62+
- run: make test.phpstan
63+
64+
- run: make test.phpmd
65+
66+
- run: make test.phpspec
67+
68+
- run: make test.yaml
69+
70+
- run: make test.twig
71+
72+
- run: make test.schema
73+
74+
- run: make test.container

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
/vendor/
2-
/node_modules/
32
/composer.lock
43

54
/etc/build/*
65
!/etc/build/.gitignore
76

8-
/tests/Application/yarn.lock
7+
/tests/Application
98

109
/behat.yml
1110
/phpspec.yml
1211

1312
/package-lock.json
1413

1514
/.php-version
15+
/php.ini
1616
/.phpunit.result.cache
1717
/node_modules
18+
/yarn.lock

0 commit comments

Comments
 (0)