forked from ListenNotes/podcast-api-php
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (56 loc) · 1.85 KB
/
Copy pathphp.yml
File metadata and controls
59 lines (56 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: PHP CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
name: Test (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, dom, mbstring, xml, xmlwriter
tools: composer:2.10.2
coverage: none
- run: composer install --no-interaction --prefer-dist --no-progress
- run: composer validate --strict
- run: composer lint
- run: composer test
- name: Check standalone distribution
run: |
composer archive --format=tar --dir=/tmp --file=podcast-api
sdk_package_dir=$(mktemp -d)
tar -xf /tmp/podcast-api.tar -C "$sdk_package_dir"
cd "$sdk_package_dir"
test ! -e vendor
test ! -e .git
test ! -e .phpunit.cache
test ! -e tests
test -f listennotes/api-contract.json
composer install --no-dev --no-interaction --no-progress
php -r 'require "vendor/autoload.php"; $client = new ListenNotes\PodcastApi\Client(); if ($client::VERSION !== "3.0.0" || count(get_class_methods(ListenNotes\PodcastApi\ApiMethods::class)) !== 30) { exit(1); }'
integration:
name: Integration (public mock API)
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
extensions: curl, dom, mbstring, xml, xmlwriter
tools: composer:2.10.2
coverage: none
- run: composer install --no-interaction --prefer-dist --no-progress
- run: composer test-integration