This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: James Collins <[email protected]>
- Loading branch information
1 parent
25cc98c
commit ed68d28
Showing
128 changed files
with
12,533 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.gitattributes export-ignore | ||
.github/ export-ignore | ||
.gitignore export-ignore | ||
artifacts/ export-ignore | ||
manifest.json export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions | ||
|
||
on: | ||
# Run on every commit. | ||
- push | ||
# Allow manually triggering the workflow. | ||
- workflow_dispatch | ||
|
||
# Cancels all previous workflow runs for the same branch that have not yet completed. | ||
concurrency: | ||
# The concurrency group contains the workflow name and the branch name. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
name: CI | ||
|
||
jobs: | ||
static-analysis: | ||
name: Static Analysis | ||
|
||
timeout-minutes: 5 | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test-type: [phpcs, phpstan] | ||
|
||
env: | ||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
# Colon means remove | ||
extensions: :apcu, :imagick | ||
coverage: none | ||
tools: none | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install composer dependencies | ||
run: composer update --no-interaction --no-ansi --no-progress --optimize-autoloader | ||
|
||
- name: Test with ${{ matrix.test-type }} | ||
run: composer test:${{ matrix.test-type }} | ||
|
||
tests: | ||
name: Tests | ||
|
||
timeout-minutes: 5 | ||
|
||
needs: static-analysis | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
test-type: [unit, integration] | ||
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1'] | ||
dependencies: [lowest, highest] | ||
exclude: | ||
- test-type: unit | ||
dependencies: lowest | ||
os: macos-latest | ||
- test-type: unit | ||
dependencies: lowest | ||
os: windows-latest | ||
- test-type: integration | ||
os: macos-latest | ||
- test-type: integration | ||
os: windows-latest | ||
|
||
env: | ||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup node | ||
if: matrix.test-type == 'integration' | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Install and run @stoplight/prism | ||
if: matrix.test-type == 'integration' | ||
run: | | ||
npm install -g @stoplight/prism-cli | ||
prism mock tests/openapi.yaml >artifacts/prism.log 2>&1 & | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: none | ||
extensions: ctype, json, mbstring, simplexml, tokenizer, xmlwriter, :apcu, :imagick | ||
ini-values: memory_limit=-1, assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On | ||
tools: none | ||
|
||
- name: Install lowest dependencies with composer | ||
if: matrix.dependencies == 'lowest' | ||
run: composer update --no-interaction --no-ansi --no-progress --prefer-lowest --optimize-autoloader | ||
|
||
- name: Install highest dependencies with composer | ||
if: matrix.dependencies == 'highest' | ||
run: composer update --no-interaction --no-ansi --no-progress --optimize-autoloader | ||
|
||
- name: Test ${{ matrix.test-type }} with phpunit | ||
run: composer test:${{ matrix.test-type }} -- --testdox | ||
|
||
- name: Upload prism log | ||
if: matrix.test-type == 'integration' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ github.event.repository.name }}-prism.log | ||
path: artifacts/prism.log | ||
|
||
coverage: | ||
name: Coverage | ||
|
||
timeout-minutes: 5 | ||
|
||
needs: tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Install and run @stoplight/prism | ||
run: | | ||
npm install -g @stoplight/prism-cli | ||
prism mock tests/openapi.yaml & | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: xdebug | ||
extensions: ctype, json, mbstring, simplexml, tokenizer, xmlwriter, :apcu, :imagick | ||
ini-values: memory_limit=-1, assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On | ||
tools: none | ||
|
||
- name: Install composer dependencies | ||
run: composer update --no-interaction --no-ansi --no-progress --optimize-autoloader | ||
|
||
- name: Test coverage with phpunit | ||
run: composer test:coverage | ||
|
||
- name: Upload code coverage results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ github.event.repository.name }}-coverage-report | ||
path: coverage/ | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ github.event.repository.name }}-artifacts | ||
path: artifacts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/.phpunit.result.cache | ||
/composer.lock | ||
/coverage | ||
/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## 1.0.0 - 2022-07-11 | ||
|
||
### Added | ||
- Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Copyright (c) 2022 Tectalic (https://tectalic.com) | ||
|
||
For copyright and license information, please view https://tectalic.com/terms |
Oops, something went wrong.