Skip to content

Commit e9881df

Browse files
authored
build script to run on release, update for changelogs another time (#450)
1 parent c1ea95d commit e9881df

File tree

1 file changed

+42
-8
lines changed

1 file changed

+42
-8
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,49 @@ permissions:
1919
statuses: write
2020

2121
jobs:
22-
add-changelog:
23-
name: Add Changelog
22+
build:
2423
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
php: [ '8.0', '8.1', '8.2' ]
27+
28+
name: PHP ${{ matrix.php }} Test
2529

2630
steps:
27-
- name: Add Changelog
28-
uses: nexmo/github-actions/nexmo-changelog@main
31+
- name: Checkout
32+
uses: actions/checkout@v2
33+
34+
- name: Setup PHP
35+
uses: shivammathur/setup-php@v2
36+
with:
37+
php-version: ${{ matrix.php }}
38+
extensions: json, mbstring
39+
coverage: pcov
2940
env:
30-
CHANGELOG_AUTH_TOKEN: ${{ secrets.CHANGELOG_AUTH_TOKEN }}
31-
CHANGELOG_CATEGORY: Server SDK
32-
CHANGELOG_RELEASE_TITLE: vonage-php-sdk-core
33-
CHANGELOG_SUBCATEGORY: php
41+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Setup problem matchers for PHPUnit
44+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
45+
46+
- name: Get Composer cache directory
47+
id: composercache
48+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
49+
50+
- name: Cache Composer dependencies
51+
uses: actions/cache@v2
52+
with:
53+
path: ${{ steps.composercache.outputs.dir }}
54+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
55+
restore-keys: ${{ runner.os }}-composer-
56+
57+
- name: Install dependencies
58+
run: composer update --prefer-dist --no-interaction
59+
60+
- name: Analyze & test
61+
run: composer test -- -v --coverage-clover=coverage.xml
62+
63+
- name: Run PHPStan
64+
run: ./vendor/bin/phpstan
65+
66+
- name: Run codecov
67+
uses: codecov/codecov-action@v1

0 commit comments

Comments
 (0)