Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
SRWieZ committed Oct 31, 2023
0 parents commit a43e133
Show file tree
Hide file tree
Showing 24 changed files with 1,838 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.gitattributes export-ignore
.github/ export-ignore
.gitignore export-ignore
.idea export-ignore
tests/ export-ignore
examples/ export-ignore
assets/ export-ignore
33 changes: 33 additions & 0 deletions .github/workflows/build-phar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build PHAR

on:
release:
types: [ created ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer:v2

- name: Install Dependencies
run: composer install

- name: Generate PHAR file
run: composer box compile

- name: Upload PHAR to Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/svgtinyps.phar
asset_name: svgtinyps.phar
asset_content_type: application/octet-stream
35 changes: 35 additions & 0 deletions .github/workflows/pint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PHP Linting (Pint)
on:
workflow_dispatch:
push:
branches-ignore:
- 'dependabot/npm_and_yarn/*'
jobs:
Pint:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer:v2

- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"

- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Launch Pint inspection
run: vendor/bin/pint

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: PHP Linting (Pint)
skip_fetch: true
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Tests

on: ['push', 'pull_request']

jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
php: [8.2, 8.3]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: xdebug

- name: Install Dependencies
run: composer install --dev --no-interaction --prefer-dist --optimize-autoloader

- name: Run tests
run: ./vendor/bin/pest
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Ignore vendor directory
/vendor

# Ignore composer.lock file
composer.lock

# Ignore .env file (if used)
.env

# Ignore IDE-specific files and directories
.idea/
.vscode/
*.sublime-*

# Ignore log and cache directories
/logs/
/cache/
/tmp
/build
.phpunit.result.cache

9 changes: 9 additions & 0 deletions assets/corruptsvg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions assets/microsoft-edge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions assets/php-alt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a43e133

Please sign in to comment.