Skip to content

Commit

Permalink
Merge pull request #164 from ker0x/tech/ci
Browse files Browse the repository at this point in the history
Update CI matrix
  • Loading branch information
ker0x authored Jan 2, 2025
2 parents 1d9a064 + db94b59 commit d9b9da5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 30 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: ci

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

Expand All @@ -14,19 +12,19 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [ '7.4', '8.0' ]
php-version: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
allow-failure: [ false ]
coverage: [ false ]
composer-flags: [ '' ]
include:
- php-version: '7.3'
coverage: true
- php-version: '8.1'
- php-version: '8.4'
allow-failure: true
composer-flags: '--ignore-platform-req php'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: php-setup
uses: shivammathur/setup-php@v2
Expand All @@ -38,7 +36,7 @@ jobs:

- name: composer-cache
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -63,7 +61,7 @@ jobs:

- name: coverage
if: ${{ matrix.coverage }}
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./build
directory: ./.coverage/coverage.xml
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016-2018 Romain Monteil
Copyright (c) 2016-2025 Romain Monteil

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
26 changes: 6 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
<div align="center">
<a href="https://github.com/ker0x/messenger/actions?query=workflow%3Aci" title="CI">
<img src="https://img.shields.io/github/workflow/status/ker0x/messenger/ci?style=for-the-badge" alt="CI">
</a>
<a href="https://codecov.io/gh/ker0x/messenger/" title="Coverage">
<img src="https://img.shields.io/codecov/c/gh/ker0x/messenger?style=for-the-badge" alt="Coverage">
</a>
<a href="https://php.net" title="PHP Version">
<img src="https://img.shields.io/badge/php-%3E%3D%207.3-8892BF.svg?style=for-the-badge" alt="PHP Version">
</a>
<a href="https://packagist.org/packages/kerox/messenger" title="Downloads">
<img src="https://img.shields.io/packagist/dt/kerox/messenger.svg?style=for-the-badge" alt="Downloads">
</a>
<a href="https://packagist.org/packages/kerox/messenger" title="Latest Stable Version">
<img src="https://img.shields.io/packagist/v/kerox/messenger.svg?style=for-the-badge" alt="Latest Stable Version">
</a>
<a href="https://packagist.org/packages/kerox/messenger" title="License">
<img src="https://img.shields.io/packagist/l/kerox/messenger.svg?style=for-the-badge" alt="License">
</a>
</div>
[![Tests](https://img.shields.io/github/actions/workflow/status/ker0x/messenger/ci.yml?label=tests&style=for-the-badge)](https://github.com/ker0x/fcm/actions/workflows/ci.yml)
[![Coverage](https://img.shields.io/codecov/c/gh/ker0x/messenger?style=for-the-badge)](https://codecov.io/gh/ker0x/messenger/)
![PHP Version](https://img.shields.io/badge/php->=7.3-4f5b93.svg?style=for-the-badge)
[![Download](https://img.shields.io/packagist/dt/kerox/messenger.svg?style=for-the-badge)](https://packagist.org/packages/kerox/messenger)
[![Packagist](https://img.shields.io/packagist/v/kerox/messenger.svg?style=for-the-badge)](https://packagist.org/packages/kerox/messenger)
[![License](https://img.shields.io/packagist/l/kerox/messenger.svg?style=for-the-badge)](https://github.com/ker0x/messenger/blob/main/LICENSE)

# Messenger

Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Api/SendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function testInvalidNotificationType(): void
public function testInvalidTagType(): void
{
$this->expectException(MessengerException::class);
$this->expectExceptionMessage('"tag" must be either "CONFIRMED_EVENT_UPDATE, POST_PURCHASE_UPDATE, ACCOUNT_UPDATE, BUSINESS_PRODUCTIVITY, COMMUNITY_ALERT, CONFIRMED_EVENT_REMINDER, NON_PROMOTIONAL_SUBSCRIPTION, PAIRING_UPDATE, APPLICATION_UPDATE, PAYMENT_UPDATE, PERSONAL_FINANCE_UPDATE, SHIPPING_UPDATE, RESERVATION_UPDATE, ISSUE_RESOLUTION, APPOINTMENT_UPDATE, GAME_EVENT, TRANSPORTATION_UPDATE, FEATURE_FUNCTIONALITY_UPDATE, TICKET_UPDATE".');
$this->expectExceptionMessage('"tag" must be either "HUMAN_AGENT, CONFIRMED_EVENT_UPDATE, POST_PURCHASE_UPDATE, ACCOUNT_UPDATE, BUSINESS_PRODUCTIVITY, COMMUNITY_ALERT, CONFIRMED_EVENT_REMINDER, NON_PROMOTIONAL_SUBSCRIPTION, PAIRING_UPDATE, APPLICATION_UPDATE, PAYMENT_UPDATE, PERSONAL_FINANCE_UPDATE, SHIPPING_UPDATE, RESERVATION_UPDATE, ISSUE_RESOLUTION, APPOINTMENT_UPDATE, GAME_EVENT, TRANSPORTATION_UPDATE, FEATURE_FUNCTIONALITY_UPDATE, TICKET_UPDATE".');
$this->sendApi->message('1008372609250235', 'Hello World!', [
'notification_type' => SendInterface::NOTIFICATION_TYPE_REGULAR,
'tag' => 'INVOICE_UPDATE',
Expand Down

0 comments on commit d9b9da5

Please sign in to comment.