-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from Setono/feature-server-side-tracking
Server side tracking
- Loading branch information
Showing
108 changed files
with
3,067 additions
and
965 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,249 @@ | ||
name: build | ||
name: "build" | ||
on: | ||
push: ~ | ||
pull_request: ~ | ||
schedule: | ||
- cron: 5 8 * * 2 | ||
push: | ||
branches: | ||
- "0.2.x" | ||
paths-ignore: | ||
- "*.md" | ||
pull_request: | ||
paths-ignore: | ||
- "*.md" | ||
workflow_dispatch: ~ | ||
|
||
env: | ||
APP_ENV: test | ||
APP_ENV: "test" | ||
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=5.7" | ||
PHP_EXTENSIONS: "intl, mbstring" | ||
|
||
jobs: | ||
checks: | ||
name: PHP ${{ matrix.php-versions }} | ||
runs-on: ubuntu-latest | ||
coding-standards: | ||
name: "Coding Standards" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: ['7.4'] | ||
php-version: | ||
- "7.4" | ||
|
||
dependencies: | ||
- "highest" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Run mysql server | ||
run: sudo /etc/init.d/mysql start | ||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: intl | ||
coverage: none | ||
- name: Install Composer dependencies | ||
run: composer update --no-progress --no-suggest --prefer-dist --no-interaction | ||
- name: Validate composer | ||
run: composer validate --strict | ||
- name: Check composer normalized | ||
run: composer normalize --dry-run | ||
- name: Check style | ||
run: composer check-style | ||
- name: Static analysis | ||
run: composer analyse | ||
- name: Run phpspec | ||
run: composer phpspec | ||
- name: Run phpunit | ||
run: composer phpunit | ||
- name: Lint container | ||
run: (cd tests/Application && bin/console lint:container) | ||
- name: Setup database | ||
run: | | ||
(cd tests/Application && bin/console doctrine:database:create -vvv) | ||
(cd tests/Application && bin/console doctrine:schema:create -vvv) | ||
- name: Run behat | ||
run: vendor/bin/behat --strict -vvv --no-interaction || vendor/bin/behat --strict -vvv --no-interaction --rerun | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Setup PHP, with composer and extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
coverage: "none" | ||
|
||
- name: "Install composer dependencies" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Validate composer" | ||
run: "composer validate --strict" | ||
|
||
- name: "Check composer normalized" | ||
run: "composer normalize --dry-run" | ||
|
||
- name: "Check style" | ||
run: "composer check-style" | ||
|
||
- name: "Lint yaml files" | ||
run: "(cd tests/Application && bin/console lint:yaml ../../src/Resources)" | ||
|
||
- name: "Lint twig files" | ||
run: "(cd tests/Application && bin/console lint:twig ../../src/Resources)" | ||
|
||
dependency-analysis: | ||
name: "Dependency Analysis" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
dependencies: | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Setup PHP, with composer and extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: "composer-require-checker, composer-unused" | ||
|
||
- name: "Install composer dependencies" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run maglnet/composer-require-checker" | ||
run: "composer-require-checker check --config-file=$(pwd)/composer-require-checker.json" | ||
|
||
- name: "Run composer-unused/composer-unused" | ||
run: "composer-unused" | ||
|
||
static-code-analysis: | ||
name: "Static Code Analysis" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
dependencies: | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Setup PHP, with composer and extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
coverage: "none" | ||
|
||
- name: "Install composer dependencies" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Cache warmup" | ||
run: "(cd tests/Application && bin/console cache:warmup)" | ||
|
||
- name: "Static analysis" | ||
run: "vendor/bin/psalm" | ||
|
||
unit-tests: | ||
name: "Unit tests" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
dependencies: | ||
- "lowest" | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Setup PHP, with composer and extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
coverage: "none" | ||
|
||
- name: "Install composer dependencies" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run phpunit" | ||
run: "composer phpunit" | ||
|
||
integration-tests: | ||
name: "Integration tests" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
dependencies: | ||
- "highest" | ||
|
||
steps: | ||
- name: "Start MySQL" | ||
run: "sudo /etc/init.d/mysql start" | ||
|
||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Setup PHP, with composer and extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
coverage: "none" | ||
|
||
- name: "Install composer dependencies" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Lint container" | ||
run: "(cd tests/Application && bin/console lint:container) || true" | ||
|
||
- name: "Create database" | ||
run: "(cd tests/Application && bin/console doctrine:database:create -vvv)" | ||
|
||
- name: "Create database schema" | ||
run: "(cd tests/Application && bin/console doctrine:schema:create -vvv)" | ||
|
||
- name: "Validate Doctrine mapping" | ||
run: "(cd tests/Application && bin/console doctrine:schema:validate -vvv)" | ||
|
||
code-coverage: | ||
name: "Code Coverage" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
dependencies: | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Setup PHP, with composer and extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "pcov" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Set up problem matchers for phpunit/phpunit" | ||
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\"" | ||
|
||
- name: "Install composer dependencies" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Collect code coverage with pcov and phpunit/phpunit" | ||
run: "vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml" | ||
|
||
- name: "Send code coverage report to Codecov.io" | ||
env: | ||
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" | ||
run: "bash <(curl -s https://codecov.io/bash)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ | |
/behat.yml | ||
/phpspec.yml | ||
/.phpunit.result.cache | ||
|
||
phpunit.xml |
Oops, something went wrong.