From 398a8eaec67e0eadccc72edabdb9695bfd2330f3 Mon Sep 17 00:00:00 2001 From: Dries De Peuter Date: Sun, 3 Mar 2024 21:15:52 +0100 Subject: [PATCH] ci: Move go github actions (#148) --- .github/workflows/ci.yaml | 57 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 42 ----------------------------- README.md | 10 +++---- composer.json | 2 +- 4 files changed, 63 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..9e0f371 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,57 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + +env: + SYMFONY_ENV: test + +jobs: + run: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: + - '8.1' + - '8.2' + - '8.3' + symfony-versions: [false] + include: + - description: 'Symfony 5.*' + php: '8.1' + symfony-versions: '^5.4' + - description: 'Symfony 6.*' + php: '8.1' + symfony-versions: '^6.4' + - description: 'Symfony 7.*' + php: '8.2' + symfony-versions: '^7.0' + name: PHP ${{ matrix.php }} ${{ matrix.description }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: actions/cache@v3 + with: + path: ~/.composer/cache/files + key: ${{ matrix.php }}-${{ matrix.symfony-versions }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Install dependencies + run: composer config extra.symfony.require ${{ matrix.symfony-versions }} + if: matrix.symfony-versions + + - name: Install dependencies + run: composer install + + - name: Run PHPUnit tests + run: | + ./vendor/bin/phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index adc9253..0000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -language: php - -sudo: false - -php: - - 7.2 - - 7.3 - - 7.4 - - nightly - - hhvm-nightly - -matrix: - fast_finish: true - include: - - php: 7.2 - env: SYMFONY_VERSION=3.4.* - - php: 7.4 - env: SYMFONY_VERSION=4.4.* - - php: 7.4 - env: SYMFONY_VERSION=5.0.* - allow_failures: - - php: hhvm-nightly - - php: nightly - -cache: - directories: - - $HOME/.composer/cache - -env: - global: - - SYMFONY_ENV=test -before_install: - - echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - -before_script: - - composer self-update - - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi; - -install: composer update --prefer-dist --no-interaction $COMPOSER_FLAGS - -script: - - vendor/bin/phpunit diff --git a/README.md b/README.md index 58cd4de..2811c2d 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ Cron Bundle =========== [![Packagist](https://img.shields.io/packagist/v/cron/cron-bundle.svg?style=flat-square)](https://packagist.org/packages/cron/cron-bundle) - [![Build Status](https://img.shields.io/travis/Cron/Symfony-Bundle.svg?style=flat-square)](https://travis-ci.org/Cron/Symfony-Bundle) + [![Build status](https://img.shields.io/github/actions/workflow/status/cron/symfony-bundle/ci.yaml?style=flat-square)](https://github.com/cron/symfony-bundle/actions/workflows/ci.yml) [![Packagist](https://img.shields.io/packagist/dt/Cron/Cron-Bundle.svg?style=flat-square)](https://packagist.org/packages/cron/cron-bundle) [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE) - + [Cron](https://github.com/Cron/Cron) integration for symfony. Installation @@ -94,9 +94,9 @@ Disable a job. ```shell bin/console cron:run [--force] [job] ``` -> which we borrowed from Symfony. -> Make sure to check out [php-cs-fixer](https://github.com/fabpot/PHP-CS-Fixer) as this will help you a lot. -> Please note that `--force` forces the job to be executed (even if disabled) based on the job schedule +> which we borrowed from Symfony. +> Make sure to check out [php-cs-fixer](https://github.com/fabpot/PHP-CS-Fixer) as this will help you a lot. +> Please note that `--force` forces the job to be executed (even if disabled) based on the job schedule ### run now, independent of the job schedule ```shell diff --git a/composer.json b/composer.json index 99e8e58..9ac8728 100644 --- a/composer.json +++ b/composer.json @@ -42,8 +42,8 @@ }, "require-dev": { "doctrine/doctrine-bundle": "*", + "monolog/monolog": "*", "phpunit/phpunit": "^10", - "symfony/framework-bundle": "^5.0|^6.0|^7.0", "symfony/security-csrf": "^5.0|^6.0|^7.0", "symfony/translation": "^5.0|^6.0|^7.0", "symfony/yaml": "^5.0|^6.0|^7.0"