Skip to content

Commit

Permalink
test: migrate to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroTroller committed Feb 22, 2024
1 parent 56cccc2 commit 11605f6
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 89 deletions.
89 changes: 0 additions & 89 deletions .circleci/config.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
on: push

jobs:
test:
name: "php${{ matrix.php }} symfony${{ matrix.symfony }} ${{matrix.minimumStability}} ${{ matrix.composerOptions }}"
runs-on: ubuntu-latest
strategy:
matrix:
php:
- '8.1'
- '8.2'
- '8.3'
symfony:
- '5.4'
- '6.2'
- '6.3'
# - '6.4'
# - '7.0'
minimumStability:
- 'stable'
composerOptions:
- '--prefer-stable --prefer-lowest'
- '--prefer-stable'
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl
tools: composer
- uses: actions/checkout@v4
- run: |
curl -s https://raw.githubusercontent.com/symfony/symfony/${{ matrix.symfony }}/composer.json | jq '.replace | to_entries | map({key: .key, value: ("< " + "${{ matrix.symfony }}" + ".0 || >= " + ("${{ matrix.symfony }}" | (((.|tonumber + 0.1) * 10)|round / 10)|tostring) + ".0")}) | from_entries' > conflict.json
jq -s '.[0] + {conflict: .[1]}' composer.json conflict.json > composer.new.json
mv composer.new.json composer.json
rm conflict.json
cat composer.json
- run: |
jq -s '.[0] + {"minimum-stability": "${{ matrix.minimumStability }}"}' composer.json > composer.new.json
mv composer.new.json composer.json
cat composer.json
- run: composer update ${{ matrix.composerOptions }}
- run: vendor/bin/phpstan analyse --no-progress --memory-limit=-1
- run: vendor/bin/phpspec run -v --config=phpspec.no-coverage.yml
- run: bin/lint-twig src/
- run: PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --diff --dry-run -vvv

0 comments on commit 11605f6

Please sign in to comment.