Skip to content

Commit 71e9909

Browse files
Merge pull request #4 from pimjansen/feature/workflow
Added workflow
2 parents cc3ec13 + c2f680a commit 71e9909

File tree

10 files changed

+274
-0
lines changed

10 files changed

+274
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contributing
2+
3+
## Issues & Pull Requests
4+
5+
* Communicate in English on issues and pull requests.
6+
* Pull requests should only contain related changes.
7+
* Changes should always be rebased on `main`
8+
* Your code should follow [our coding standard](https://www.php-fig.org/per/coding-style/).
9+
* Your code should be covered by unit tests.
10+
* All checks must pass before your code is merged.
11+
12+
---
13+
14+
Once your code is merged, it is available to everybody, for free, under the [MIT License](/LICENSE).
15+
By publishing your pull request on the project, you implicitly agree with the aforementioned license.
16+
17+
**Thank you for your contribution! It wouldn't be so great without you.**

.github/ISSUE_TEMPLATE/BUG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
### Summary
10+
11+
<!-- Provide a summary here -->
12+
13+
### Versions
14+
15+
<!-- Provide the versions of PHP and `azure-storage-php-adapter-flysystem` on which the issue has been observed -->
16+
17+
| | Version |
18+
| :------------------------------------------ | :------ |
19+
| PHP version | x.y.z |
20+
| `azure-storage-php-adapter-laravel` version | x.y.z |
21+
22+
### Self-enclosed code snippet for reproduction
23+
24+
```php
25+
# replace this with a self-enclosed usage example
26+
```
27+
28+
### Expected output
29+
30+
```txt
31+
# replace this with the expected output of your self-enclosed example
32+
```
33+
34+
### Actual output
35+
36+
```txt
37+
# replace this with the actual output of your self-enclosed example
38+
```

.github/SECURITY.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
The following versions of `azure-oss/azure-storage-php-adapter-flysystem` have active support:
6+
7+
| Version | Supported |
8+
|---------|--------------------|
9+
| 1.x | :white_check_mark: |
10+
11+
## Reporting a Vulnerability
12+
13+
If you believe that you have found a security vulnerability, please send us a message to get in touch. Ensure to **NOT
14+
INCLUDE** all details required in the public.

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "composer"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/stale.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
daysUntilStale: 21
2+
daysUntilClose: 7
3+
exemptLabels:
4+
- "pinned"
5+
- "security"
6+
# Label to use when marking an issue as stale
7+
staleLabel: "lifecycle/stale"
8+
# Comment to post when marking an issue as stale. Set to `false` to disable
9+
markComment: >
10+
This issue has been automatically marked as stale because it has not had
11+
recent activity. It will be closed after 1 week if no further activity occurs. Thank you
12+
for your contributions.
13+
# Comment to post when closing a stale issue. Set to `false` to disable
14+
closeComment: false

.github/workflows/bc-check.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- "main"
6+
7+
name: Breaking Changes
8+
9+
jobs:
10+
roave-bc-check:
11+
name: Roave BC Check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Check for breaking changes
19+
run: docker run --env GITHUB_REPOSITORY="Azure-OSS/azure-storage-php-adapter-laravel" -u $(id -u) -v $(pwd):/app nyholm/roave-bc-check-ga
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
on: # yamllint disable-line rule:truthy
2+
pull_request: ~
3+
push:
4+
branches:
5+
- "main"
6+
- "[0-9].*"
7+
8+
name: "Code Coverage"
9+
10+
jobs:
11+
code-coverage:
12+
name: "Code Coverage"
13+
14+
strategy:
15+
matrix:
16+
php-version:
17+
- "8.1"
18+
19+
services:
20+
azurite:
21+
image: mcr.microsoft.com/azure-storage/azurite
22+
ports:
23+
- 10000:10000
24+
25+
runs-on: "ubuntu-latest"
26+
27+
steps:
28+
- name: "Checkout code"
29+
uses: "actions/checkout@v4"
30+
31+
- name: "Install PHP with extensions"
32+
uses: "shivammathur/setup-php@v2"
33+
with:
34+
coverage: xdebug
35+
extensions: json curl
36+
php-version: "${{ matrix.php-version }}"
37+
38+
- name: "Download dependencies"
39+
run: composer install --ansi --no-interaction --no-progress --optimize-autoloader
40+
41+
- name: "Collect code coverage with PHPUnit"
42+
run: vendor/bin/phpunit --colors=always --coverage-clover=.build/logs/clover.xml
43+
44+
- name: "Send code coverage report to codecov.io"
45+
run: bash <(curl -s https://codecov.io/bash)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
pull_request: ~
3+
push:
4+
branches:
5+
- "main"
6+
7+
name: Coding Standards
8+
9+
permissions: write-all
10+
11+
jobs:
12+
pint:
13+
name: Check & fix styling
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
php-version:
20+
- 8.1 # Always run on the lowest supported version due to compatibility
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Set up PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php-version }}
30+
extensions: curl json
31+
coverage: none
32+
33+
- name: Download dependencies
34+
run: composer install --no-interaction --no-progress --optimize-autoloader
35+
36+
- name: Run laravel/pint
37+
run: vendor/bin/pint
38+
39+
- name: Commit linted files
40+
uses: stefanzweifel/git-auto-commit-action@v5
41+
with:
42+
commit_message: "Fixes coding style"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
on:
2+
pull_request: ~
3+
push:
4+
branches:
5+
- "main"
6+
7+
name: Static analysis
8+
9+
jobs:
10+
phpstan:
11+
name: PHPStan
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
php-version: [8.1]
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php-version }}
26+
extensions: curl json
27+
coverage: none
28+
29+
- name: Download dependencies
30+
run: composer install --no-interaction --no-progress --optimize-autoloader
31+
32+
- name: Run PHPStan
33+
run: vendor/bin/phpstan --no-progress --memory-limit=2G

.github/workflows/tests.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- "main"
6+
7+
name: Tests
8+
9+
jobs:
10+
phpunit:
11+
name: PHPUnit on ${{ matrix.operating-system }} with PHP ${{ matrix.php-version }}
12+
13+
strategy:
14+
matrix:
15+
operating-system:
16+
- 'ubuntu-latest'
17+
php-version:
18+
- '8.1'
19+
- '8.2'
20+
- '8.3'
21+
- '8.4'
22+
23+
services:
24+
azurite:
25+
image: mcr.microsoft.com/azure-storage/azurite
26+
ports:
27+
- 10000:10000
28+
29+
runs-on: ${{ matrix.operating-system }}
30+
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v4
34+
35+
- name: Install PHP with extensions
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php-version }}
39+
extensions: curl json
40+
coverage: none
41+
42+
- name: Download dependencies
43+
run: composer install --no-interaction --no-progress --optimize-autoloader
44+
45+
- name: Run tests
46+
run: ./vendor/bin/phpunit

0 commit comments

Comments
 (0)