Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: github actions #99

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
on:
push:
branches: [ $default-branch ]
pull_request: ~

permissions:
contents: read

jobs:
phpunit:
strategy:
matrix:
include:
- php: '7.2'
- php: '7.3'
- php: '7.4'
- php: '7.2'
prefer_lowest: 1
- php: '7.2'
symfony: 4.4.*
- php: '7.2'
symfony: 4.4.*
- php: '7.3'
symfony: 4.4.*
- php: '7.4'
symfony: 4.4.*
- php: '7.2'
symfony: 5.4.*
- php: '7.3'
symfony: 5.4.*
- php: '7.4'
symfony: 5.4.*
fail-fast: false
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
tools: phpunit:8
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}
- name: Install global packages
run: composer global require satooshi/php-coveralls:@stable phpunit/phpunit:@stable --no-update
- name: Symfony version setup
if: ${{ matrix.symfony }}
run: composer require "symfony/symfony:${{ matrix.symfony }}" --no-update
- name: Install dependencies
run: composer update --prefer-dist --no-progress
env:
COMPOSER_PREFER_LOWEST: ${{ matrix.prefer_lowest }}
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Run test suite
run: phpunit -c phpunit.xml.dist
64 changes: 0 additions & 64 deletions .travis.yml

This file was deleted.

10 changes: 3 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,18 @@
"require": {
"php": "^7.2",
"influxdb/influxdb-php": "^1.2",
"symfony/console": "^3.4 || ^4.0 || ^5.0",
"symfony/framework-bundle": "^3.4 || ^4.0 || ^5.0"
"symfony/console": "^4.4 || ^5.4",
"symfony/framework-bundle": "^4.4 || ^5.4"
},
"require-dev": {
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"phpspec/prophecy": "^1.10",
"symfony/form": "^3.4 || ^4.0 || ^5.0",
"symfony/phpunit-bridge": "^3.4 || ^4.0 || ^5.0"
"symfony/form": "^4.4 || ^5.4"
},
"suggest": {
"symfony/form": "Needed for form types usage",
"symfony/proxy-manager-bridge": "Needed to lazy-load connection services"
},
"conflict": {
"symfony/form": "<3.4"
},
"autoload": {
"psr-4": { "Algatux\\InfluxDbBundle\\": "src/" }
},
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class ConfigurationTest extends AbstractExtensionConfigurationTestCase
public function test_empty_configuration_process()
{
$this->expectException(InvalidConfigurationException::class);
$this->expectExceptionMessage('The child node "host" at path "influx_db.connections.default" must be configured.');
$this->expectExceptionMessageMatches(
'/^The child (node|config) "host" (under|at path) "influx_db.connections.default" must be configured/'
);

$this->assertProcessedConfigurationEquals([], [
__DIR__.'/../../fixtures/config/config_empty.yml',
Expand Down
Loading