Skip to content

Commit

Permalink
Change github workflow (#1460)
Browse files Browse the repository at this point in the history
* Change github workflow

* Update Makefile

* Update tests/Stripe/GeneratedExamplesTest.php

* Update Makefile

* Yaml sucks

---------

Co-authored-by: pakrym-stripe <[email protected]>
  • Loading branch information
richardm-stripe and pakrym-stripe authored Mar 20, 2023
1 parent 2c64107 commit d13503a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,12 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Start stripe-mock
run: docker pull stripe/stripe-mock && docker run -d -p 12111-12112:12111-12112 stripe/stripe-mock && sleep 5
- uses: stripe/openapi/actions/stripe-mock@master

- name: Run test suite
run: |
php --version
./build.php $env:AUTOLOAD
make ci-test
- name: Coveralls
run: vendor/bin/php-coveralls -v --coverage_clover='clover.xml' --json_path='coveralls-upload.json'
Expand All @@ -141,3 +140,18 @@ jobs:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_FLAG_NAME: php-${{ matrix.php-version }}-${{ matrix.env }}

publish:
# Doesn't actually publish. The publish happens via a packagist webhook configured in the Github UI. But we still display a message here
name: Publish
if: >-
(github.event_name == 'workflow_dispatch' || github.event_name == 'push') &&
startsWith(github.ref, 'refs/tags/v') &&
endsWith(github.actor, '-stripe')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: stripe/openapi/actions/notify-release@master
if: always()
with:
bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ test: vendor
vendor/bin/phpunit
.PHONY: test

ci-test: vendor
./build.php $$AUTOLOAD
.PHONY: ci-test

fmt: vendor
PHP_CS_FIXER_IGNORE_ENV=true vendor/bin/php-cs-fixer fix -v --using-cache=no
.PHONY: fmt
Expand Down

0 comments on commit d13503a

Please sign in to comment.