diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index f6e9ef4..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -coverage_clover: build/logs/clover.xml diff --git a/.github/workflows/code_checks.yaml b/.github/workflows/code_checks.yaml new file mode 100644 index 0000000..ffc0244 --- /dev/null +++ b/.github/workflows/code_checks.yaml @@ -0,0 +1,66 @@ +# .github/workflows/code_checks.yaml +name: Code_Checks + +on: ["push", "pull_request"] + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [ '7.3', '7.4', '8.0', '8.1', '8.2' ] + stability: [ prefer-stable ] + include: + - php: '7.3' + stability: prefer-lowest + - php: '7.3' + - php: '7.4' + - php: '8.0' + - php: '8.1' + - php: '8.2' + + name: PHP ${{ matrix.php }} - ${{ matrix.stability }} tests + steps: + - uses: actions/checkout@v3 + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/.composer/cache/files + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: pcov, xdebug + coverage: xdebug + + - name: Install dependencies + run: | + composer update --prefer-dist --no-interaction + + - name: Execute tests + run: ./vendor/bin/phpunit --configuration "./build/phpunit.xml" --verbose --coverage-text + + + cs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 + with: + php-version: 8.1 + coverage: none + - run: composer install --no-progress + - run: composer phing + + finish: + needs: tests + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true diff --git a/.gitignore b/.gitignore index 1251376..19312f9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ vendor composer.lock build/logs/* !build/logs/.gitkeep +/build/.phpunit.result.cache \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b9e6823..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: php -sudo: false - -env: - - XDEBUG_MODE=coverage - -php: - - 7.3 - - 7.4 - - 8.0 - -before_install: - - composer self-update - -cache: - directories: - - $HOME/.composer/cache - -install: composer update --prefer-dist --no-interaction - -script: - - ./vendor/bin/phing build - -after_success: - - travis_retry php vendor/bin/coveralls diff --git a/composer.json b/composer.json index ad0e70e..3ba2ef6 100644 --- a/composer.json +++ b/composer.json @@ -18,11 +18,9 @@ }, "require-dev": { "ext-pdo": "*", - "phing/phing": "^2.16", - "symfony/phpunit-bridge": "^5.2", + "phing/phing": "^2.17", "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.5", - "php-coveralls/php-coveralls": "^v2.4" + "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "psr-4": { @@ -39,5 +37,10 @@ "name": "flagception/flagception", "url": "https://github.com/bestit/flagception-sdk" } + }, + "scripts": { + "phing": [ + "./vendor/bin/phing build" + ] } }