-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from liip/switch-to-github-actions
switch build from travis-ci to github actions
- Loading branch information
Showing
13 changed files
with
779 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
latest: | ||
name: PHP ${{ matrix.php }} | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: | ||
- '7.4' | ||
- '8.0' | ||
- '8.1' | ||
|
||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update dependencies for PHP 8 | ||
if: matrix.php >= '8.0' | ||
run: composer update --prefer-dist --no-interaction --no-progress --no-ansi | ||
|
||
- name: Execute 7 tests | ||
run: make phpcs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.0' | ||
coverage: none | ||
ini-values: phar.readonly=0 | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Determine version name | ||
id: get-version | ||
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/} | ||
|
||
- name: Update application version | ||
run: sed -i 's/Varnish Plus CLI/Varnish Plus CLI ${{ steps.get-version.outputs.version }}/g' bin/varnish-plus-cli.php && cat bin/varnish-plus-cli.php | ||
|
||
- name: Build PHP 7.4 phar with makefile | ||
run: make dist | ||
|
||
- name: Build PHP 8.0 phar with makefile | ||
run: make dist-php8 | ||
|
||
- name: Check if we can run the phar | ||
run: | | ||
- ./dist/varnish-plus-cli.phar --version | ||
- ./dist/varnish-plus-cli.8.0.phar --version | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
# This token is provided by GitHub Actions. | ||
# You DO NOT need to create your own token. | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
name: ${{ steps.get-version.outputs.version }} | ||
tag: ${{ steps.get-version.outputs.version }} | ||
body: 'Stable release.' | ||
artifacts: ./dist/varnish-plus-cli.phar, ./dist/varnish-plus-cli.8.0.phar | ||
artifactContentType: application/x-php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.