From bc8df2dd0d6e927392fdbc121106f89393a8bf42 Mon Sep 17 00:00:00 2001 From: widmogrod Date: Wed, 18 Dec 2024 17:28:32 +0100 Subject: [PATCH 1/4] feat: switch TravisCI to GitHub Actions --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 27 ---------------------- 2 files changed, 48 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b4bdafc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: PHP Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + tests: + runs-on: ubuntu-latest + + strategy: + matrix: + php-version: [ 7.1, 7.2 ] + include: + - php-version: 7.1 + env: + COVERAGE: yes + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + + - name: Install dependencies + run: composer install --prefer-source + + - name: Run tests + run: composer test + + - name: Run code coverage check + if: ${{ matrix.env.COVERAGE == 'yes' }} + run: composer check-code + + - name: Cache Composer + uses: actions/cache@v3 + with: + path: ${{ runner.os }}/.composer/cache + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 81bb190..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: php - -php: - - 7.1 - - 7.2 - -matrix: - include: - - php: 7.1 - env: COVERAGE=yes - -cache: - directories: - - $HOME/.composer/cache - -before_script: - - composer self-update - -install: - - composer install --prefer-source - -script: - - composer test - - if [[ $COVERAGE == yes ]]; then composer check-code; fi - -notifications: - email: false From 2e4a6e0a38d17ff79404caad894a44fa3587e3df Mon Sep 17 00:00:00 2001 From: widmogrod Date: Wed, 18 Dec 2024 17:33:49 +0100 Subject: [PATCH 2/4] feat: change on criteria --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4bdafc..31649c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,10 @@ name: PHP Tests on: - push: - branches: - - main pull_request: + push: branches: - - main + - master jobs: tests: From d396b341492b15cb954a0acdcf568364030c7390 Mon Sep 17 00:00:00 2001 From: widmogrod Date: Wed, 18 Dec 2024 17:35:10 +0100 Subject: [PATCH 3/4] feat: test against php 8.0 and 8.4 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31649c7..09da891 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - php-version: [ 7.1, 7.2 ] + php-version: [ 7.1, 7.2, 8.0, 8.4 ] include: - php-version: 7.1 env: From 133947957fbdc7b0300e4b429e28bf1101f488a9 Mon Sep 17 00:00:00 2001 From: widmogrod Date: Wed, 18 Dec 2024 17:44:51 +0100 Subject: [PATCH 4/4] feat: remove php 8 target --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09da891..31edd2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - php-version: [ 7.1, 7.2, 8.0, 8.4 ] + php-version: [ 7.1, 7.2] include: - php-version: 7.1 env: