From 06a412d055328e1aa6e0430f3fb64ba8ebd53651 Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Tue, 14 Feb 2023 18:08:55 +0100 Subject: [PATCH 1/7] chore: replace travis with github actions --- .coveralls.yml | 1 - .github/workflows/code_checks.yaml | 67 ++++++++++++++++++++++++++++++ .gitignore | 1 + .travis.yml | 25 ----------- composer.json | 7 +++- 5 files changed, 74 insertions(+), 27 deletions(-) delete mode 100644 .coveralls.yml create mode 100644 .github/workflows/code_checks.yaml delete mode 100644 .travis.yml 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..e60ea8f --- /dev/null +++ b/.github/workflows/code_checks.yaml @@ -0,0 +1,67 @@ +# .github/workflows/code_checks.yaml +name: Code_Checks + +on: ["push", "pull_request"] + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + stability: [ prefer-stable ] + include: + - php: '7.3' + stability: prefer-lowest + - 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 + vendor/bin/simple-phpunit install + + - name: Execute tests + env: + SYMFONY_DEPRECATIONS_HELPER: 'weak' + run: ./vendor/bin/simple-phpunit --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..7d85c3e 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "require-dev": { "ext-pdo": "*", "phing/phing": "^2.16", - "symfony/phpunit-bridge": "^5.2", + "symfony/phpunit-bridge": "^5.2||^6.0", "phpunit/phpunit": "^9.5", "squizlabs/php_codesniffer": "^3.5", "php-coveralls/php-coveralls": "^v2.4" @@ -39,5 +39,10 @@ "name": "flagception/flagception", "url": "https://github.com/bestit/flagception-sdk" } + }, + "scripts": { + "phing": [ + "./vendor/bin/phing build" + ] } } From 4bb2f9548f7f1d65309e320b544fc73635e5e582 Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Tue, 14 Feb 2023 18:11:15 +0100 Subject: [PATCH 2/7] chore: replace travis with github actions --- .github/workflows/code_checks.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code_checks.yaml b/.github/workflows/code_checks.yaml index e60ea8f..58498fa 100644 --- a/.github/workflows/code_checks.yaml +++ b/.github/workflows/code_checks.yaml @@ -9,10 +9,12 @@ jobs: 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' @@ -40,9 +42,7 @@ jobs: vendor/bin/simple-phpunit install - name: Execute tests - env: - SYMFONY_DEPRECATIONS_HELPER: 'weak' - run: ./vendor/bin/simple-phpunit --verbose --coverage-text + run: ./vendor/bin/simple-phpunit --verbose cs: From 2323d86fa0a617311ed4905b7d8fd11b22dd267c Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Tue, 14 Feb 2023 18:17:28 +0100 Subject: [PATCH 3/7] chore: replace travis with github actions --- .github/workflows/code_checks.yaml | 2 +- composer.json | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code_checks.yaml b/.github/workflows/code_checks.yaml index 58498fa..befda22 100644 --- a/.github/workflows/code_checks.yaml +++ b/.github/workflows/code_checks.yaml @@ -42,7 +42,7 @@ jobs: vendor/bin/simple-phpunit install - name: Execute tests - run: ./vendor/bin/simple-phpunit --verbose + run: ./vendor/bin/simple-phpunit --configuration "../build/phpunit.xml" --verbose --coverage-text cs: diff --git a/composer.json b/composer.json index 7d85c3e..87e92dd 100644 --- a/composer.json +++ b/composer.json @@ -19,10 +19,9 @@ "require-dev": { "ext-pdo": "*", "phing/phing": "^2.16", - "symfony/phpunit-bridge": "^5.2||^6.0", + "symfony/phpunit-bridge": "^5.2 || ^6.0", "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.5", - "php-coveralls/php-coveralls": "^v2.4" + "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "psr-4": { From cc43c29a77375ecddeddbb42974cc622ba1289ec Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Tue, 14 Feb 2023 18:18:34 +0100 Subject: [PATCH 4/7] chore: replace travis with github actions --- .github/workflows/code_checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_checks.yaml b/.github/workflows/code_checks.yaml index befda22..317d9a9 100644 --- a/.github/workflows/code_checks.yaml +++ b/.github/workflows/code_checks.yaml @@ -42,7 +42,7 @@ jobs: vendor/bin/simple-phpunit install - name: Execute tests - run: ./vendor/bin/simple-phpunit --configuration "../build/phpunit.xml" --verbose --coverage-text + run: ./vendor/bin/simple-phpunit --configuration "./build/phpunit.xml" --verbose --coverage-text cs: From f5dfcb8c4ed6d9d5a6ce53e5bf4f74ac3369e32a Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Tue, 14 Feb 2023 18:24:36 +0100 Subject: [PATCH 5/7] chore: replace travis with github actions --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 87e92dd..3ba2ef6 100644 --- a/composer.json +++ b/composer.json @@ -18,8 +18,7 @@ }, "require-dev": { "ext-pdo": "*", - "phing/phing": "^2.16", - "symfony/phpunit-bridge": "^5.2 || ^6.0", + "phing/phing": "^2.17", "phpunit/phpunit": "^9.5", "squizlabs/php_codesniffer": "^3.5" }, From 139263911e146c79eb2fc2d0edafa3a4ac5d961c Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Tue, 14 Feb 2023 18:25:43 +0100 Subject: [PATCH 6/7] chore: replace travis with github actions --- .github/workflows/code_checks.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/code_checks.yaml b/.github/workflows/code_checks.yaml index 317d9a9..ffc0244 100644 --- a/.github/workflows/code_checks.yaml +++ b/.github/workflows/code_checks.yaml @@ -39,10 +39,9 @@ jobs: - name: Install dependencies run: | composer update --prefer-dist --no-interaction - vendor/bin/simple-phpunit install - name: Execute tests - run: ./vendor/bin/simple-phpunit --configuration "./build/phpunit.xml" --verbose --coverage-text + run: ./vendor/bin/phpunit --configuration "./build/phpunit.xml" --verbose --coverage-text cs: From ba5fb9aea5b52bf700543d300d3da6b78670c0ad Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Tue, 14 Feb 2023 18:08:55 +0100 Subject: [PATCH 7/7] chore: replace travis with github actions --- .coveralls.yml | 1 - .github/workflows/code_checks.yaml | 66 ++++++++++++++++++++++++++++++ .gitignore | 1 + .travis.yml | 25 ----------- composer.json | 11 +++-- 5 files changed, 74 insertions(+), 30 deletions(-) delete mode 100644 .coveralls.yml create mode 100644 .github/workflows/code_checks.yaml delete mode 100644 .travis.yml 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" + ] } }