Skip to content

Commit

Permalink
Better test + Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
SRWieZ committed Nov 1, 2023
1 parent 338ee63 commit 6d2ebd6
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/pint.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
name: PHP Linting (Pint)
name: Linting
on:
workflow_dispatch:
push:
branches-ignore:
- 'dependabot/npm_and_yarn/*'
jobs:
Pint:
pint:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- uses: actions/checkout@v3
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

Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Tests

on: ['push', 'pull_request']
on:
pull_request: ~
push:
branches:
- main

jobs:
ci:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -12,7 +16,13 @@ jobs:

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

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ matrix.os }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true,
"require-dev": {
"pestphp/pest": "^2.0",
Expand Down
9 changes: 6 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# SVGTinyPS
[![Latest Stable Version](http://poser.pugx.org/srwiez/php-svg-ps-converter/v)](https://packagist.org/packages/srwiez/php-svg-ps-converter) [![Total Downloads](http://poser.pugx.org/srwiez/php-svg-ps-converter/downloads)](https://packagist.org/packages/srwiez/php-svg-ps-converter) [![Latest Unstable Version](http://poser.pugx.org/srwiez/php-svg-ps-converter/v/unstable)](https://packagist.org/packages/srwiez/php-svg-ps-converter) [![License](http://poser.pugx.org/srwiez/php-svg-ps-converter/license)](https://packagist.org/packages/srwiez/php-svg-ps-converter) [![PHP Version Require](http://poser.pugx.org/srwiez/php-svg-ps-converter/require/php)](https://packagist.org/packages/srwiez/php-svg-ps-converter)
[![Tests](https://github.com/SRWieZ/php-svg-ps-converter/actions/workflows/test.yml/badge.svg)](https://github.com/SRWieZ/php-svg-ps-converter/actions/workflows/tests.yml)
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/SRWieZ/php-svg-ps-converter/test.yml?label=Tests)


SVG (Portable and Secure) converter for BIMI compliance.

[Read more from bimi group](https://bimigroup.org/creating-bimi-svg-logo-files/)
and [the RFC](https://datatracker.ietf.org/doc/id/draft-svg-tiny-ps-abrotman-00.txt)

🧪 If you just want to convert your SVG, you can use the
🧪 If you just want to convert your SVG in a nice ui, you can use the
[online version of the converter!](https://checkbimi.com/convertsvg)

You can also checkout the [command line version](https://github.com/SRWieZ/svgps-commandline) of this project.

## Installation

```bash
Expand Down Expand Up @@ -45,7 +48,7 @@ SVGTinyPS was created by Eser DENIZ.
Inspired by the official scripts
of [authindicators/svg-ps-converters](https://github.com/authindicators/svg-ps-converters)

Thanks to [gilbarbara/logos](https://github.com/gilbarbara/logos) for the logos that I used in the tests.
Thanks to [gilbarbara/logos](https://github.com/gilbarbara/logos) for the logos used in the tests.

## License

Expand Down
4 changes: 3 additions & 1 deletion tests/Feature/SVGIssuesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
// var_export(array_values(array_unique($issues)));

$diff = array_diff(array_unique($issues), array_unique($issues_excepted));
$diff2 = array_diff(array_unique($issues), array_unique($issues_excepted));

expect($diff)->toBeEmpty();
expect($diff)->toBeEmpty()
->and($diff2)->toBeEmpty();
})->with('logos');

0 comments on commit 6d2ebd6

Please sign in to comment.