Skip to content

Commit 504a042

Browse files
authored
Merge pull request #14 from osteel/feature/github-ci
GitHub CI
2 parents a470858 + c3796d0 commit 504a042

7 files changed

Lines changed: 55 additions & 66 deletions

File tree

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
11+
phpcs:
12+
name: PHP_CodeSniffer
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Run PHP_CodeSniffer
20+
uses: chekalsky/phpcs-action@v1
21+
22+
phpunit:
23+
name: PHPUnit
24+
runs-on: ubuntu-latest
25+
26+
strategy:
27+
matrix:
28+
php-version:
29+
- "7.4"
30+
- "8.0"
31+
- "8.1"
32+
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v2
36+
37+
- name: Set up PHP
38+
uses: shivammathur/setup-php@v2
39+
with:
40+
php-version: ${{ matrix.php-version }}
41+
coverage: none
42+
43+
- name: Install Composer dependencies
44+
uses: "ramsey/composer-install@v1"
45+
46+
- name: Run PHPUnit
47+
run: vendor/bin/phpunit tests

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
**/.DS_Store
2-
build
32
composer.lock
43
vendor
54
phpcs.xml

.scrutinizer.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The MIT License (MIT)
22

3-
Copyright (c) 2020 Yannick Chenot <hello@yannickchenot.com>
3+
Copyright (c) 2022 Yannick Chenot <yannick@yellowraincoat.co.uk>
44

55
> Permission is hereby granted, free of charge, to any person obtaining a copy
66
> of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# OpenAPI HttpFoundation Testing
22

3+
[![Build Status](https://github.com/osteel/php-cli-demo/workflows/CI/badge.svg)](https://github.com/osteel/php-cli-demo/actions)
34
[![Latest Stable Version](https://poser.pugx.org/osteel/openapi-httpfoundation-testing/v)](//packagist.org/packages/osteel/openapi-httpfoundation-testing)
45
[![License](https://poser.pugx.org/osteel/openapi-httpfoundation-testing/license)](//packagist.org/packages/osteel/openapi-httpfoundation-testing)
5-
[![Build Status](https://travis-ci.com/osteel/openapi-httpfoundation-testing.svg?token=SDx8eeySnDpzswpLVTU3&branch=main)](https://travis-ci.com/osteel/openapi-httpfoundation-testing)
6-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/osteel/openapi-httpfoundation-testing/badges/quality-score.png?b=main&s=bef9ddbf29dac69612a3092e4761e14ce768bccd)](https://scrutinizer-ci.com/g/osteel/openapi-httpfoundation-testing/?branch=main)
76

87
Validate HttpFoundation requests and responses against OpenAPI (3.0.x) definitions.
98

10-
See [this article](https://tech.osteel.me/posts/openapi-backed-api-testing-in-php-projects-a-laravel-example "OpenAPI-backed API testing in PHP projects – a Laravel example") for more details, and [this repository](https://github.com/osteel/openapi-httpfoundation-testing-laravel-example) for an example use in a Laravel project.
9+
See [this post](https://tech.osteel.me/posts/openapi-backed-api-testing-in-php-projects-a-laravel-example "OpenAPI-backed API testing in PHP projects – a Laravel example") for more details and [this repository](https://github.com/osteel/openapi-httpfoundation-testing-laravel-example) for an example use in a Laravel project.
1110

1211
💡 _While you can safely use this package for your projects, as long as version `1.0` has not been released "minor" version patches can contain breaking changes. Make sure to check the [release section](../../releases) before you upgrade._
1312

phpcs.xml.dist

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
<arg name="colors" />
1010
<arg value="s" />
1111

12-
<!-- Use the PSR12 Standard-->
12+
<!-- Use the PSR12 standard -->
1313
<rule ref="PSR12" />
14+
15+
<!-- Files and folders to analyse -->
16+
<file>src</file>
17+
<file>tests</file>
1418
</ruleset>

0 commit comments

Comments
 (0)