File tree Expand file tree Collapse file tree 4 files changed +26
-18
lines changed
Expand file tree Collapse file tree 4 files changed +26
-18
lines changed Original file line number Diff line number Diff line change 2020 with :
2121 args : --config=.php_cs --diff --dry-run
2222
23+ check-spec :
24+ name : Check SDK is in sync with spec
25+ runs-on : ubuntu-latest
26+ steps :
27+ - name : Checkout
28+ uses : actions/checkout@v2
29+
30+ - name : Install dependencies
31+ run : composer update --prefer-dist --no-interaction
32+
33+ - name : Generate SDK in ci_generated directory
34+ run : CI_TEST=1 vendor/bin/jane-openapi generate --config-file=.jane-openapi.php
35+
36+ - name : Fix CS on ci_generated directory
37+ run : vendor/bin/php-cs-fixer fix --diff --dry-run ci_generated
38+
39+ - name : Check ci_generated and generated directories are equal
40+ run : diff ci_generated generated
41+
2342 tests :
2443 name : Test PHP ${{ matrix.php-version }} ${{ matrix.name }}
2544 runs-on : ubuntu-latest
4362 php-version : ${{ matrix.php-version }}
4463 extensions : mbstring, xml
4564
46- - name : Get composer cache directory
47- id : composer-cache
48- run : echo "::set-output name=dir::$(composer config cache-files-dir)"
49-
50- - name : Cache composer dependencies
51- uses : actions/cache@v2
52- with :
53- path : ${{ steps.composer-cache.outputs.dir }}
54- key : ${{ runner.os }}-composer-${{ github.sha }}
55- restore-keys : ${{ runner.os }}-composer-
56-
5765 - name : Install dependencies
58- run : composer update --prefer-dist --no-interaction ${{ matrix.composer-flags }}
66+ run : " composer update --prefer-dist --no-interaction ${{ matrix.composer-flags }}"
5967
6068 - name : Run tests
6169 run : php vendor/bin/simple-phpunit
Original file line number Diff line number Diff line change @@ -10,5 +10,5 @@ composer.phar
1010phpunit.xml
1111
1212# tests
13- generated_ci
13+ ci_generated
1414.phpunit.result.cache
Original file line number Diff line number Diff line change 33$ directory = __DIR__ . '/generated/ ' ;
44
55if (!empty ($ _SERVER ['CI_TEST ' ])) {
6- $ directory = __DIR__ . '/generated_ci / ' ;
6+ $ directory = __DIR__ . '/ci_generated / ' ;
77}
88
99return [
Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ return PhpCsFixer\Config::create()
3434 'semicolon_after_instruction ' => true ,
3535 'combine_consecutive_unsets ' => true ,
3636 ))
37- ->setFinder (
38- PhpCsFixer \Finder:: create ( )
39- -> in ( __DIR__ )
40- ->exclude ('doc ' )
37+ ->setFinder (PhpCsFixer \Finder:: create ()
38+ -> in ( __DIR__ )
39+ -> exclude ( ' doc ' )
40+ ->exclude ('ci_generated ' )
4141 )
4242;
You can’t perform that action at this time.
0 commit comments