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 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