Skip to content

Commit b407019

Browse files
committed
Finalize initial release
1 parent 8b32012 commit b407019

6 files changed

Lines changed: 83 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
coding-standard:
12+
runs-on: ubuntu-latest
13+
name: Coding Standard
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Cache Composer dependencies
18+
uses: actions/cache@v3
19+
with:
20+
path: /tmp/composer-cache
21+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
22+
- uses: php-actions/composer@v6
23+
with:
24+
php_version: "8.0"
25+
- name: Check coding standard
26+
run: composer phpcs
27+
28+
static-analysis:
29+
runs-on: ubuntu-latest
30+
name: Static Analysis
31+
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v2
35+
36+
- name: Psalm
37+
uses: docker://ghcr.io/psalm/psalm-github-actions
38+
39+
test:
40+
runs-on: ubuntu-latest
41+
strategy:
42+
matrix:
43+
php:
44+
- version: "8.0"
45+
phpunit: "9"
46+
- version: "8.1"
47+
phpunit: "10"
48+
- version: "8.2"
49+
phpunit: "10"
50+
- version: "8.3"
51+
phpunit: "10"
52+
53+
name: "Test: PHP ${{ matrix.php.version }}"
54+
55+
steps:
56+
- uses: actions/checkout@v3
57+
- name: Cache Composer dependencies
58+
uses: actions/cache@v3
59+
with:
60+
path: /tmp/composer-cache
61+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
62+
- uses: php-actions/composer@v6
63+
with:
64+
dev: no
65+
php_version: "${{ matrix.php.version }}"
66+
- uses: php-actions/phpunit@v3
67+
env:
68+
XDEBUG_MODE: coverage
69+
with:
70+
version: "${{ matrix.php.phpunit }}"
71+
php_version: "${{ matrix.php.version }}"
72+
php_extensions: xdebug
73+
args: --coverage-text

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# JSON Schema Validator
22

3+
[![License](http://poser.pugx.org/nerou/json-schema-validator/license)](https://packagist.org/packages/nerou/json-schema-validator)
4+
[![Version](http://poser.pugx.org/nerou/json-schema-validator/version)](https://packagist.org/packages/nerou/json-schema-validator)
5+
36
Validates some [JSON Schema](https://json-schema.org/) files against the JSON Schema specification.
47

58
## Installation
69

7-
10+
`composer require [--dev] nerou/json-schema-validator`
811

912
## Usage
1013

1114
Just pass some JSON schema files or folders containing those like so:
1215

1316
```shell
14-
php validateJSONSchema.php schema-file1.json schema-file2.json schema-folder [...]
17+
./vendor/bin/json-schema-validator schema-file1.json schema-file2.json schema-folder [...]
1518
```
1619

1720
## License

bin/json-schema-validator

-6 Bytes
Binary file not shown.

box.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
],
88
"force-autodiscovery": true,
99
"algorithm": "SHA256",
10-
"banner": "JSON Schema Validator @git-version@ by Andreas Wahlen",
11-
"git-version": "git-version"
10+
"banner": "JSON Schema Validator by Andreas Wahlen",
11+
"git": "git-version"
1212
}

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
},
2323
"prefer-stable": true,
2424
"autoload": {
25-
"psr-4": {
26-
"": "src/"
27-
}
25+
"files": [
26+
"src/functions.php"
27+
]
2828
},
2929
"bin": [
3030
"bin/json-schema-validator"

test/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)