-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Replace Travis and Appveyor by GitHub Actions #1171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| name: "CI" | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - 'master' | ||
|
|
||
| env: | ||
| fail-fast: true | ||
| PHPUNIT_FLAGS: "-v" | ||
| SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit" | ||
| SYMFONY_REQUIRE: ">=4.4" | ||
|
|
||
| jobs: | ||
| test: | ||
| name: "${{ matrix.operating-system }} / PHP ${{ matrix.php-version }}" | ||
| runs-on: ${{ matrix.operating-system }} | ||
| continue-on-error: ${{ matrix.allow-failures }} | ||
|
|
||
| strategy: | ||
| matrix: | ||
| operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest'] | ||
| php-version: ['7.2.9', '7.3', '7.4', '8.0'] | ||
|
|
||
| steps: | ||
| - name: "Checkout code" | ||
| uses: actions/[email protected] | ||
|
|
||
| - name: "Install PHP with extensions" | ||
| uses: shivammathur/[email protected] | ||
| with: | ||
| coverage: "none" | ||
| extensions: "intl, mbstring, pdo_sqlite" | ||
| php-version: ${{ matrix.php-version }} | ||
| tools: composer:v2 | ||
|
|
||
| - name: "Add PHPUnit matcher" | ||
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
|
||
| - name: "Set composer cache directory" | ||
| id: composer-cache | ||
| run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
|
||
| - name: "Cache composer" | ||
| uses: actions/[email protected] | ||
| with: | ||
| path: ${{ steps.composer-cache.outputs.dir }} | ||
| key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }} | ||
| restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer- | ||
|
|
||
| - name: "Require symfony/flex" | ||
| run: composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main | ||
|
|
||
| - if: matrix.php-version != '8.0' | ||
| run: composer update | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't the CI run with the locked dependencies instead ?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @javiereguiluz maybe |
||
|
|
||
| - if: matrix.php-version == '8.0' | ||
| run: composer update --ignore-platform-reqs=php | ||
|
|
||
| - name: "Install PHPUnit" | ||
| run: vendor/bin/simple-phpunit install | ||
|
|
||
| - name: "PHPUnit version" | ||
| run: vendor/bin/simple-phpunit --version | ||
|
|
||
| - name: "Run tests" | ||
| run: vendor/bin/simple-phpunit ${{ env.PHPUNIT_FLAGS }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| name: "Lint" | ||
|
|
||
| on: [push, pull_request] | ||
javiereguiluz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| env: | ||
| fail-fast: true | ||
|
|
||
| jobs: | ||
| php-cs-fixer: | ||
| name: PHP-CS-Fixer | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: "Checkout code" | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: PHP-CS-Fixer | ||
javiereguiluz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| uses: docker://oskarstark/php-cs-fixer-ga | ||
| with: | ||
| args: --diff --dry-run | ||
|
|
||
| linters: | ||
| name: Linters | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| php-version: ['7.4'] | ||
javiereguiluz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| steps: | ||
| - name: "Checkout code" | ||
| uses: actions/[email protected] | ||
|
|
||
| - name: "Install PHP with extensions" | ||
| uses: shivammathur/[email protected] | ||
| with: | ||
| coverage: "none" | ||
| extensions: intl | ||
| php-version: ${{ matrix.php-version }} | ||
| tools: composer:v2 | ||
|
|
||
| - name: "Set composer cache directory" | ||
| id: composer-cache | ||
| run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
|
||
| - name: "Cache composer" | ||
| uses: actions/[email protected] | ||
| with: | ||
| path: ${{ steps.composer-cache.outputs.dir }} | ||
| key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }} | ||
| restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer- | ||
|
|
||
| - name: "Require symfony/flex" | ||
| run: composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main | ||
|
|
||
| - name: "Composer update" | ||
| id: install | ||
| run: composer update --no-scripts | ||
|
|
||
| - name: Lint YAML files | ||
| if: always() && steps.install.outcome == 'success' | ||
| run: ./bin/console lint:yaml config --parse-tags | ||
|
|
||
| - name: Lint Twig templates | ||
| if: always() && steps.install.outcome == 'success' | ||
| run: ./bin/console lint:twig templates --env=prod | ||
|
|
||
| - name: Lint XLIFF translations | ||
| if: always() && steps.install.outcome == 'success' | ||
| run: ./bin/console lint:xliff translations | ||
|
|
||
| - name: Lint Parameters and Services | ||
| if: always() && steps.install.outcome == 'success' | ||
| run: ./bin/console lint:container | ||
|
|
||
| - name: Lint Doctrine entities | ||
| if: always() && steps.install.outcome == 'success' | ||
| run: ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction | ||
|
|
||
| - name: Lint Composer config | ||
| if: always() && steps.install.outcome == 'success' | ||
| run: composer validate --strict | ||
|
|
||
| - name: Download Symfony CLI | ||
| if: always() && steps.install.outcome == 'success' | ||
| run: wget https://get.symfony.com/cli/installer -O - | bash | ||
|
|
||
| - name: Check if any dependencies are compromised | ||
| if: always() && steps.install.outcome == 'success' | ||
| run: /home/runner/.symfony/bin/symfony check:security | ||
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.