-
Notifications
You must be signed in to change notification settings - Fork 13
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
Showing
47 changed files
with
1,444 additions
and
1,594 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 |
---|---|---|
@@ -1,14 +1,46 @@ | ||
name: CI | ||
name: "CI Tests" | ||
|
||
on: [push] | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-test: | ||
runs-on: ubuntu-latest | ||
|
||
test: | ||
runs-on: 'ubuntu-20.04' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['8.2', '8.3'] | ||
symfony: ['6.0.*', '6.1.*', '6.2.*', '6.3.*', '6.4.*', '7.0.*', '7.1.*'] | ||
composer-flags: ['--prefer-stable'] | ||
extensions: ['curl, iconv, mbstring, pdo, pdo_sqlite, sqlite, zip'] | ||
include: | ||
- php: '8.2' | ||
symfony: '6.0.*' | ||
composer-flags: '--prefer-stable --prefer-lowest' | ||
extensions: 'curl, iconv, mbstring, pdo, pdo_sqlite, sqlite, zip' | ||
exclude: | ||
- php: '8.2' | ||
symfony: '6.0.*' | ||
name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: php-actions/composer@v6 | ||
- uses: php-actions/phpstan@v3 | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-symfony-${{ matrix.symfony }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}-flags-${{ matrix.composer-flags }} | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
memory_limit: -1 | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2, flex | ||
extensions: ${{ matrix.extensions }} | ||
coverage: none | ||
- name: Install dependencies | ||
run: composer update ${{ matrix.composer-flags }} --prefer-dist --no-suggest | ||
env: | ||
SYMFONY_REQUIRE: ${{ matrix.symfony }} | ||
|
||
- name: Run PHPUnit | ||
run: vendor/bin/phpunit | ||
|
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,13 @@ | ||
name: "CI Tests" | ||
|
||
on: [push, pull_request] | ||
jobs: | ||
build-lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: php-actions/composer@v6 | ||
- uses: php-actions/phpstan@v3 | ||
with: | ||
memory_limit: -1 |
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,49 @@ | ||
name: Publish and release | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Read version from composer.json | ||
id: get_version | ||
run: | | ||
VERSION=$(cat composer.json | jq -r '.version') | ||
echo "version=$VERSION" >> $GITHUB_ENV | ||
echo "::set-output name=version::$VERSION" | ||
- name: Check if tag exists | ||
id: check_tag | ||
run: | | ||
TAG_EXISTS=$(git tag -l "${{ steps.get_version.outputs.version }}") | ||
echo "tag_exists=$TAG_EXISTS" >> $GITHUB_ENV | ||
echo "::set-output name=tag_exists::$TAG_EXISTS" | ||
- name: Create GitHub Tag | ||
if: steps.check_tag.outputs.tag_exists == '' | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const tag = `${process.env.version}`; | ||
const latestCommitSha = context.sha; | ||
await github.rest.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: `refs/tags/${tag}`, | ||
sha: latestCommitSha, | ||
}); | ||
- name: Create a Release | ||
if: steps.check_tag.outputs.tag_exists == '' | ||
uses: elgohr/Github-Release-Action@v5 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag: "${{ steps.get_version.outputs.version }}" | ||
title: "${{ steps.get_version.outputs.version }}" |
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 |
---|---|---|
|
@@ -15,3 +15,4 @@ public/index.php | |
composer.lock | ||
.DS_Store | ||
.thumbs | ||
.phpunit.cache |
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
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
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
Oops, something went wrong.