Skip to content

Commit cc9e5b7

Browse files
author
Greg Bowler
committed
initial commit
0 parents  commit cc9e5b7

5 files changed

Lines changed: 135 additions & 0 deletions

File tree

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# These are supported funding model platforms
2+
github: [phpgt]

.github/dependabot.yml

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

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
composer:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Cache Composer dependencies
13+
uses: actions/cache@v2
14+
with:
15+
path: /tmp/composer-cache
16+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
17+
18+
- name: Composer install
19+
uses: php-actions/composer@v6
20+
with:
21+
php_version: '8.1'
22+
23+
- name: Archive build
24+
run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./
25+
26+
- name: Upload build archive for test runners
27+
uses: actions/upload-artifact@v2
28+
with:
29+
name: build-artifact
30+
path: /tmp/github-actions
31+
32+
phpunit:
33+
runs-on: ubuntu-latest
34+
needs: [composer]
35+
36+
steps:
37+
- uses: actions/download-artifact@v2
38+
with:
39+
name: build-artifact
40+
path: /tmp/github-actions
41+
42+
- name: Extract build archive
43+
run: tar -xvf /tmp/github-actions/build.tar ./
44+
45+
- name: PHP Unit tests
46+
uses: php-actions/phpunit@v3
47+
with:
48+
php_version: '8.1'
49+
php_extensions: xdebug
50+
configuration: test/phpunit/phpunit.xml
51+
bootstrap: vendor/autoload.php

.scrutinizer.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
build:
2+
environment:
3+
php: 8.1.0
4+
5+
nodes:
6+
analysis:
7+
tests:
8+
override:
9+
- php-scrutinizer-run
10+
11+
tests-and-coverage:
12+
environment:
13+
php:
14+
ini:
15+
"xdebug.mode": coverage
16+
tests:
17+
override:
18+
- phpcs-run ./src
19+
- command: "vendor/bin/phpunit test/phpunit --coverage-clover test/phpunit/_coverage --whitelist src"
20+
coverage:
21+
file: "test/phpunit/_coverage"
22+
format: "php-clover"
23+
24+
checks:
25+
php:
26+
code_rating: true
27+
duplication: true
28+
29+
filter:
30+
excluded_paths:
31+
- test/*
32+
- vendor/*

composer.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "phpgt/filecache",
3+
"description": " Cache data in local files.",
4+
"type": "library",
5+
6+
"require": {
7+
"php": ">=8.1"
8+
},
9+
10+
"require-dev": {
11+
"phpstan/phpstan": "v1.8.0",
12+
"phpunit/phpunit": "v9.5.21"
13+
},
14+
15+
"license": "MIT",
16+
"authors": [
17+
{
18+
"name": "Greg Bowler",
19+
"homepage": "https://www.g105b.com",
20+
"email": "greg.bowler@g105b.com",
21+
"role": "Developer"
22+
}
23+
],
24+
25+
"autoload": {
26+
"psr-4": {
27+
"Gt\\FileCache\\": "./src"
28+
}
29+
},
30+
31+
"autoload-dev": {
32+
"psr-4": {
33+
"Gt\\FileCache\\Test\\": "./test/phpunit"
34+
}
35+
},
36+
37+
"funding": [
38+
{
39+
"type": "github",
40+
"url": "https://github.com/sponsors/PhpGt"
41+
}
42+
]
43+
}

0 commit comments

Comments
 (0)