-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
b8330be
commit 7f6c48e
Showing
1 changed file
with
3 additions
and
32 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 |
---|---|---|
|
@@ -21,43 +21,14 @@ jobs: | |
os: | ||
- ubuntu-latest | ||
php-version: | ||
- "8.1" | ||
- "8.2" | ||
- "8.3" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
uses: "shivammathur/setup-php@2.25.5" | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: composer:v2 | ||
coverage: none | ||
tools: "php-cs-fixer:v3, composer:v2" | ||
coverage: "none" | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Test annotations | ||
run: | | ||
echo "::error file=bin/unipoints::PLEASE RUN bin/unipoints build" | ||
- name: Install Composer dependencies | ||
run: composer update --prefer-lowest --optimize-autoloader --no-progress --ansi --no-interaction | ||
- name: Build | ||
run: ./bin/unipoints build | ||
- name: Check PHP coding style | ||
if: startsWith(matrix.os, 'ubuntu') && matrix.php-version == '8.2' | ||
run: composer run-script phpcs -- --ansi --no-interaction --dry-run --diff | ||
- name: PHPUnit | ||
run: composer run-script test -- --colors=always | ||
- name: Check changes | ||
id: check-changes | ||
if: startsWith(matrix.os, 'ubuntu') && matrix.php-version == '8.2' && github.repository == 'mlocati/unipoints' && github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
run: | | ||
if ! git diff --exit-code --name-status; then | ||
echo "commit=yes" >>"$GITHUB_OUTPUT" | ||
fi | ||
- name: Push changes | ||
if: steps.check-changes.outputs.commit == 'yes' | ||
run: | | ||
git config user.name 'Michele Locati' | ||
git config user.email '[email protected]' | ||
git add --all | ||
git commit -m 'Automatic update built assets' | ||
git push |