From 1d28b2d9b4742e56cf6eeb6bca2f7a556ca5c91e Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 12 Dec 2020 13:05:59 +0100 Subject: [PATCH 1/2] Try workflows --- .github/workflows/tests.yaml | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..c82fc86 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,56 @@ +name: Test + +on: + push: + branches: + - master + pull_request: + +jobs: + test: + name: PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }} + runs-on: ubuntu-18.04 + + strategy: + matrix: + php-version: + - 7.4 + - 8.0 + dependencies: [highest] + include: + - php-version: 7.2 + dependencies: lowest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: pcov + tools: composer:v2 + + - name: Install Composer dependencies (PHP 7 ${{ matrix.dependencies }}) + if: matrix.php-version != '8.0' + uses: ramsey/composer-install@v1 + with: + dependency-versions: ${{ matrix.dependencies }} + composer-options: --prefer-dist --prefer-stable + + - name: Install Composer dependencies (PHP 8 ${{ matrix.dependencies }}) + if: matrix.php-version == '8.0' + uses: ramsey/composer-install@v1 + with: + dependency-versions: ${{ matrix.dependencies }} + composer-options: --prefer-dist --prefer-stable --ignore-platform-reqs + + - name: Perform syntax check + run: ant lint + + - name: Find coding standard violations using PHP Code Sniffer + run: ant phpcs + + - name: Run unit tests with PHPUnit + run: ant phpunit From 5692ae0dc9ec572148e3ed402bb2040b04d10737 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 12 Dec 2020 17:07:36 +0100 Subject: [PATCH 2/2] Remove circle ci --- .circleci/config.yml | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index be58426..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,44 +0,0 @@ -version: 2.1 - -executors: - php: - docker: - - image: circleci/php:7.2 - environment: - TZ: '/usr/share/zoneinfo/Europe/Paris' - working_directory: ~/Symfony-custom-coding-standard - -commands: - start: - steps: - - checkout - - run: sudo apt-get update - - run: sudo apt-get install -y ant - -jobs: - test: - executor: php - steps: - - start - - restore_cache: - keys: - - v1-dependencies-{{ checksum "composer.lock" }} - - v1-dependencies- - - run: ant test - - save_cache: - paths: - - vendor - key: v1-dependencies-{{ checksum "composer.lock" }} - lowest: - executor: php - steps: - - start - - run: composer update --prefer-lowest - - run: ant phpunit - -workflows: - version: 2 - check: - jobs: - - test - - lowest