Skip to content

Commit

Permalink
Allow Symfony + add Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
fsevestre committed Dec 29, 2022
1 parent d3da23c commit 906179c
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 8 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Continuous Integration

on:
pull_request: ~
push: ~

jobs:
check:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
- name: Validate composer.json
run: composer validate --strict --no-check-lock
tests:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- description: 'No Symfony specified'
php: '7.2'
- description: 'No Symfony specified'
php: '7.3'
- description: 'No Symfony specified'
php: '7.4'
- description: 'No Symfony specified'
php: '8.0'
- description: 'No Symfony specified'
php: '8.1'
- description: 'No Symfony specified'
php: '8.2'
- description: 'Lowest deps'
php: '7.2'
composer_option: '--prefer-lowest'
env:
SYMFONY_DEPRECATIONS_HELPER: max[self]=0
- description: 'Dev deps'
php: '8.1'
dev: true
name: PHP ${{ matrix.php }} tests (${{ matrix.description }})
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: composer-${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.composer_option }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- run: |
sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' composer.json;
if: matrix.symfony
- run: composer config minimum-stability dev
if: matrix.dev
- run: composer update --no-interaction --no-progress --ansi ${{ matrix.composer_option }}
- run: bin/phpunit
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) 2017 Florent SEVESTRE
Copyright (c) 2017-2022 Florent SEVESTRE

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
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
Boolean form type
=================

[![Build Status](https://travis-ci.org/fsevestre/BooleanFormType.svg?branch=master)](https://travis-ci.org/fsevestre/BooleanFormType)
[![Coverage Status](https://coveralls.io/repos/github/fsevestre/BooleanFormType/badge.svg?branch=master)](https://coveralls.io/github/fsevestre/BooleanFormType?branch=master)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/fsevestre/BooleanFormType/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/fsevestre/BooleanFormType)


Boolean form type for Symfony REST APIs.


Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
"homepage": "https://github.com/fsevestre/BooleanFormType",
"require": {
"php": ">=7.2.5",
"symfony/form": "~5.0"
"symfony/form": "^5.0 | ^6.0"
},
"require-dev": {
"phpunit/phpunit": "^8.5"
"phpunit/phpunit": "^8.5",
"symfony/phpunit-bridge": "^5.0 | ^6.0"
},
"autoload": {
"psr-4": { "FSevestre\\BooleanFormType\\": "src/" }
Expand Down

0 comments on commit 906179c

Please # to comment.