Skip to content

Commit

Permalink
Update dependencies to fix infinite recursion in go-code-builder (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop authored Aug 31, 2021
1 parent 15fcc8f commit f6ed742
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 42 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/cloc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: cloc
on:
pull_request:
jobs:
cloc:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
path: pr
- name: Checkout base code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.base.sha }}
path: base
- name: Count Lines Of Code
id: loc
run: |
curl -OL https://github.com/vearutop/sccdiff/releases/download/v1.0.1/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz
OUTPUT=$(cd pr && ../sccdiff -basedir ../base)
OUTPUT="${OUTPUT//'%'/'%25'}"
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
OUTPUT="${OUTPUT//$'\r'/'%0D'}"
echo "::set-output name=diff::$OUTPUT"
- name: Comment Code Lines
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
header: LOC
message: |
### Lines Of Code
${{ steps.loc.outputs.diff }}
38 changes: 38 additions & 0 deletions .github/workflows/test-unit-cov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: test-unit-cov
on:
push:
branches:
- master
- main
pull_request:
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ 'ubuntu-latest' ]
php-versions: [ '7.4' ]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache vendor
uses: actions/cache@v2
with:
path: |
vendor
key: vendor-${{ hashFiles('composer.lock') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: composer

- name: Populate vendor
run: '[ -e vendor ] || composer install'

- name: Run Tests With Coverage
run: make test-coverage && bash <(curl -s https://codecov.io/bash)
37 changes: 37 additions & 0 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: test-unit
on:
push:
branches:
- master
- main
pull_request:
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ 'ubuntu-latest' ]
php-versions: [ '5.6', '7.0', '7.1', '7.2', '7.3', '8.0' ]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache vendor
uses: actions/cache@v2
with:
path: |
vendor
key: vendor-${{ hashFiles('composer.lock') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-values: post_max_size=256M, max_execution_time=180
tools: composer

- name: Populate vendor
run: '[ -e vendor ] || composer install'

- name: Run Tests
run: make test
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ 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.8.7] - 2021-04-20

### Fixed
- Out of memory error with infinite recursion in some JSON Schema references.

## [1.8.6] - 2021-04-20

### Added
Expand Down Expand Up @@ -175,6 +180,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Local file resolver in references.

[1.8.7]: https://github.com/swaggest/json-cli/compare/v1.8.6...v1.8.7
[1.8.6]: https://github.com/swaggest/json-cli/compare/v1.8.5...v1.8.6
[1.8.5]: https://github.com/swaggest/json-cli/compare/v1.8.4...v1.8.5
[1.8.4]: https://github.com/swaggest/json-cli/compare/v1.8.3...v1.8.4
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"php-yaoi/php-yaoi": "^1",
"symfony/yaml": "^3",
"salsify/json-streaming-parser": "^7.0",
"swaggest/json-schema": "^0.12.21",
"swaggest/go-code-builder": "0.4.44",
"swaggest/json-schema": "^0.12.37",
"swaggest/go-code-builder": "0.4.47",
"swaggest/php-code-builder": "^0.2.29",
"swaggest/code-builder": "^0.3.2",
"swaggest/json-schema-maker": "^0.3.4"
Expand Down
78 changes: 39 additions & 39 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class App extends Command\Application
{
public static $ver = 'v1.8.6';
public static $ver = 'v1.8.7';

public $diff;
public $apply;
Expand Down

0 comments on commit f6ed742

Please sign in to comment.