Skip to content

Commit cbaf32c

Browse files
authored
Allow custom line separator in CSVArray::toCSV() (#11)
* Allow custom line separator in `CSVArray::toCSV()` * Update CI
1 parent e01de9b commit cbaf32c

File tree

7 files changed

+207
-220
lines changed

7 files changed

+207
-220
lines changed

.github/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

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

77
## Code Style
88

.github/workflows/continuous-integration.yml

-210
This file was deleted.

.github/workflows/format.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
composer-normalize:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
ref: ${{ github.head_ref }}
17+
18+
- uses: shivammathur/setup-php@v2
19+
with:
20+
coverage: none
21+
extensions: mbstring
22+
php-version: 8.3
23+
24+
- run: composer install --no-interaction --no-progress --no-suggest
25+
26+
- run: composer normalize
27+
28+
- uses: stefanzweifel/git-auto-commit-action@v4
29+
with:
30+
commit_message: Normalize composer.json
31+
32+
php-cs-fixer:
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
ref: ${{ github.head_ref }}
39+
40+
- uses: shivammathur/setup-php@v2
41+
with:
42+
coverage: none
43+
extensions: mbstring
44+
php-version: 8.3
45+
46+
- run: composer install --no-interaction --no-progress --no-suggest
47+
48+
- run: vendor/bin/php-cs-fixer fix
49+
50+
- uses: stefanzweifel/git-auto-commit-action@v4
51+
with:
52+
commit_message: Apply php-cs-fixer changes

.github/workflows/validate.yml

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
composer-validate:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: shivammathur/setup-php@v2
17+
with:
18+
coverage: none
19+
extensions: mbstring
20+
php-version: 8.3
21+
22+
- run: composer validate --strict
23+
24+
static-code-analysis:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- uses: shivammathur/setup-php@v2
31+
with:
32+
coverage: none
33+
extensions: mbstring
34+
php-version: 8.3
35+
36+
- run: composer install --no-interaction --no-progress --no-suggest
37+
38+
- run: vendor/bin/phpstan analyse
39+
40+
tests:
41+
name: "Tests - PHP ${{ matrix.php-version }}, Illuminate ${{ matrix.illuminate }}, ${{ matrix.dependencies }}"
42+
43+
runs-on: ubuntu-latest
44+
45+
strategy:
46+
matrix:
47+
php-version:
48+
- "7.4"
49+
- "8.0"
50+
- "8.1"
51+
- "8.2"
52+
- "8.3"
53+
54+
dependencies:
55+
- lowest
56+
- highest
57+
58+
illuminate:
59+
- ^8.73
60+
- ^9
61+
- ^10
62+
exclude:
63+
- php-version: "7.4"
64+
illuminate: ^9
65+
- php-version: "7.4"
66+
illuminate: ^10
67+
- php-version: "8.0"
68+
illuminate: ^10
69+
70+
steps:
71+
- uses: actions/checkout@v4
72+
73+
- uses: shivammathur/setup-php@v2
74+
with:
75+
coverage: none
76+
extensions: mbstring
77+
php-version: "${{ matrix.php-version }}"
78+
79+
- run: composer require "illuminate/support:${{ matrix.illuminate }}" --no-interaction --no-update
80+
81+
- if: matrix.dependencies == 'lowest'
82+
run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest
83+
84+
- if: matrix.dependencies == 'highest'
85+
run: composer update --no-interaction --no-progress --no-suggest
86+
87+
- run: vendor/bin/phpunit
88+
89+
code-coverage:
90+
runs-on: ubuntu-latest
91+
92+
steps:
93+
- uses: actions/checkout@v4
94+
95+
- uses: shivammathur/setup-php@v2
96+
with:
97+
coverage: pcov
98+
extensions: mbstring
99+
php-version: 8.3
100+
101+
- run: composer install --no-interaction --no-progress --no-suggest
102+
103+
- run: vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml
104+
105+
- uses: codecov/codecov-action@v3
106+
107+
mutation-tests:
108+
runs-on: ubuntu-latest
109+
110+
steps:
111+
- uses: actions/checkout@v4
112+
113+
- uses: shivammathur/setup-php@v2
114+
with:
115+
coverage: pcov
116+
extensions: mbstring
117+
php-version: 8.3
118+
119+
- run: composer install --no-interaction --no-progress --no-suggest
120+
121+
- run: vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=60 --min-msi=60

0 commit comments

Comments
 (0)