Skip to content

Commit

Permalink
Allow custom line separator in CSVArray::toCSV() (#11)
Browse files Browse the repository at this point in the history
* Allow custom line separator in `CSVArray::toCSV()`

* Update CI
  • Loading branch information
spawnia authored Jan 25, 2024
1 parent e01de9b commit cbaf32c
Show file tree
Hide file tree
Showing 7 changed files with 207 additions and 220 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

We are using [GitHub Actions](https://github.com/features/actions) as a continuous integration system.

For details, see [`workflows/continuous-integration.yml`](workflows/continuous-integration.yml).
For details, see [`workflows`](workflows).

## Code Style

Expand Down
210 changes: 0 additions & 210 deletions .github/workflows/continuous-integration.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
pull_request:
push:
branches:
- master

jobs:
composer-normalize:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: mbstring
php-version: 8.3

- run: composer install --no-interaction --no-progress --no-suggest

- run: composer normalize

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Normalize composer.json

php-cs-fixer:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: mbstring
php-version: 8.3

- run: composer install --no-interaction --no-progress --no-suggest

- run: vendor/bin/php-cs-fixer fix

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply php-cs-fixer changes
121 changes: 121 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
pull_request:
push:
branches:
- master

jobs:
composer-validate:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: mbstring
php-version: 8.3

- run: composer validate --strict

static-code-analysis:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: mbstring
php-version: 8.3

- run: composer install --no-interaction --no-progress --no-suggest

- run: vendor/bin/phpstan analyse

tests:
name: "Tests - PHP ${{ matrix.php-version }}, Illuminate ${{ matrix.illuminate }}, ${{ matrix.dependencies }}"

runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"

dependencies:
- lowest
- highest

illuminate:
- ^8.73
- ^9
- ^10
exclude:
- php-version: "7.4"
illuminate: ^9
- php-version: "7.4"
illuminate: ^10
- php-version: "8.0"
illuminate: ^10

steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: mbstring
php-version: "${{ matrix.php-version }}"

- run: composer require "illuminate/support:${{ matrix.illuminate }}" --no-interaction --no-update

- if: matrix.dependencies == 'lowest'
run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest

- if: matrix.dependencies == 'highest'
run: composer update --no-interaction --no-progress --no-suggest

- run: vendor/bin/phpunit

code-coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
coverage: pcov
extensions: mbstring
php-version: 8.3

- run: composer install --no-interaction --no-progress --no-suggest

- run: vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml

- uses: codecov/codecov-action@v3

mutation-tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
coverage: pcov
extensions: mbstring
php-version: 8.3

- run: composer install --no-interaction --no-progress --no-suggest

- run: vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=60 --min-msi=60
Loading

0 comments on commit cbaf32c

Please sign in to comment.