forked from immobiliare/ApnsPHP
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
411c308
commit 9f42b35
Showing
2 changed files
with
66 additions
and
0 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,57 @@ | ||
# SPDX-FileCopyrightText: Copyright 2021 M2mobi B.V., Amsterdam, The Netherlands | ||
# SPDX-FileCopyrightText: Copyright 2022 Move Agency Group B.V., Zwolle, The Netherlands | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
name: Integration Tests | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
phpunit: | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental }} | ||
name: "PHP-${{ matrix.php-versions }}: Integration" | ||
strategy: | ||
matrix: | ||
php-versions: ['8.3'] | ||
experimental: [false] | ||
include: | ||
- php-versions: 8.4 | ||
experimental: true | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: uopz | ||
tools: phpunit:9.5.x | ||
|
||
- name: Setup problem matchers for PHP | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
|
||
- name: Setup problem matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: Install dependencies | ||
run: composer update | ||
|
||
- name: Setup payload dumper | ||
run: | | ||
echo << EOF >> get_payload.php | ||
<?php | ||
include_once "./vendor/autoload.php"; | ||
$message = new \ApnsPHP\Message(); | ||
echo $message->getPayload(); | ||
?> | ||
EOF | ||
- name: Run Payload dumper | ||
run: php ./get_payload.php | tee payload.json | ||
|
||
- name: Install JSONSchema | ||
run: pipx install check-jsonschema | ||
|
||
- name: Check payload | ||
run: check-jsonschema --schemafile doc/schemas/message.schema.json payload.json |
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,9 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"title": "APNS Push Message", | ||
"description": "A Push message for APNS", | ||
"type": "object", | ||
"properties": { | ||
"productId": {} | ||
} | ||
} |