From 27c811616872e52e450dcec734d48a7ed91667a0 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Tue, 21 Sep 2021 03:50:10 +0900 Subject: [PATCH 1/8] Add GitHub Actions for CI --- .github/workflows/ci.yaml | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..d57cf0c --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,40 @@ +name: ci + +on: + pull_request: + branches: '*' + push: + branches: + - master + - main + - 'release-*' + +jobs: + mri: + strategy: + matrix: + os: [ubuntu] + php: + - '5.3' + - '5.4' + - '5.5' + - '5.6' + - '7.0' + - '7.1' + - '7.2' + - '7.3' + - '7.4' + - '8.0' + - '8.1' + runs-on: ${{ matrix.os }}-latest + steps: + - uses: actions/checkout@v2 + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: composer:v2 + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: git submodule update --init + - run: composer install + - run: make test From 254b27a6baecdcacba4be2790be994cebab541f3 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Tue, 21 Sep 2021 03:57:44 +0900 Subject: [PATCH 2/8] Replace Build Status badge from travis-ci.org to GitHub Actions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5adf9cd..8143fdf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Woothee PHP -[![Build Status](https://travis-ci.org/woothee/woothee-php.svg?branch=master)](https://travis-ci.org/woothee/woothee-php) +[![Build Status](https://github.com/woothee/woothee-php/workflows/ci/badge.svg)](https://github.com/woothee/woothee-php/actions/workflows/ci.yaml) [![Coverage Status](https://coveralls.io/repos/woothee/woothee-php/badge.png)](https://coveralls.io/r/woothee/woothee-php) [![Packagist](https://img.shields.io/packagist/v/woothee/woothee.svg)](https://packagist.org/packages/woothee/woothee) From 6bd3eb3800f965d0f25423d30ad7e3e55bc3b9ad Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Tue, 21 Sep 2021 04:03:53 +0900 Subject: [PATCH 3/8] Remove .travis.yml --- .travis.yml | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dbf0eb0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: php - -php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - -matrix: - include: - - php: 5.3 - dist: precise - allow_failures: - - php: 5.3 - - php: 5.4 - - php: 5.5 - -cache: - directories: - - $HOME/.composer/cache - -before_script: - - composer install - -script: vendor/bin/phpunit - -after_success: - - if [ -f vendor/bin/php-coveralls ] ; then travis_retry php vendor/bin/php-coveralls -v; else travis_retry php vendor/bin/coveralls -v; fi From 542f753050d06c4a3c50ef20bc54859a507fab23 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Tue, 21 Sep 2021 04:04:19 +0900 Subject: [PATCH 4/8] Add actions/cache to ci.yaml --- .github/workflows/ci.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d57cf0c..c06fca2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,6 +35,15 @@ jobs: tools: composer:v2 env: COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - id: composer-cache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- - run: git submodule update --init - - run: composer install + - run: composer install --prefer-dist --no-progress --no-suggest - run: make test From 939f21f1b0168aca2246c0d12fb1341b73a88cc5 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Tue, 21 Sep 2021 06:56:47 +0900 Subject: [PATCH 5/8] Use ** instead of * to match the branch name --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c06fca2..b42ce6e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,7 +2,7 @@ name: ci on: pull_request: - branches: '*' + branches: '**' push: branches: - master From 56e3d013cb6ded318e3fdb01109f10768a6fdf56 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sat, 25 Sep 2021 21:32:30 +0900 Subject: [PATCH 6/8] Update .github/workflows/ci.yaml Co-authored-by: Yuya Takeyama --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b42ce6e..a07a01c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,7 +2,8 @@ name: ci on: pull_request: - branches: '**' + branches: + - '**' push: branches: - master From 77d7ad0ce890fc837db719b236bc3051450f0d7a Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sun, 26 Sep 2021 04:14:01 +0900 Subject: [PATCH 7/8] Update .github/workflows/ci.yaml Co-authored-by: Yuya Takeyama --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a07a01c..f7f7382 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,7 +33,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - tools: composer:v2 + tools: composer:v2 env: COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - id: composer-cache From 9c9fd3fd84fb4cd55f1bcfe5ed86864681926fd9 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sun, 26 Sep 2021 14:18:41 +0900 Subject: [PATCH 8/8] Replace jobs name from mri --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f7f7382..a3de6db 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ on: - 'release-*' jobs: - mri: + build: strategy: matrix: os: [ubuntu]