From b15a96f83e2a85c18cc6ac29095ed23d9ff53b44 Mon Sep 17 00:00:00 2001 From: Annie Li Date: Fri, 17 Mar 2023 14:36:34 -0700 Subject: [PATCH 1/2] Use shared stripe-mock action --- .github/workflows/main.yml | 7 +++++-- Makefile | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d682a75303..8bb7164907 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -84,8 +84,7 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - name: Start stripe-mock - run: docker run -d -p 12111-12112:12111-12112 stripe/stripe-mock && sleep 5 + - uses: stripe/openapi/actions/stripe-mock@master - name: Test run: yarn && yarn test @@ -127,3 +126,7 @@ jobs: env: NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} NPM_OTP: ${{ secrets.NPM_OTP }} + - uses: stripe/openapi/actions/notify-release@master + if: always() + with: + bot_token: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/Makefile b/Makefile index 7ab089751c..1acedb842a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: codegen-format update-version +.PHONY: codegen-format update-version test ci-test update-version: @echo "$(VERSION)" > VERSION @perl -pi -e 's|"version": "[.\-\d\w]+"|"version": "$(VERSION)"|' package.json @@ -6,3 +6,8 @@ update-version: codegen-format: yarn && yarn fix && yarn build + +ci-test: + yarn && yarn test + +test: ci-test From ec1a6fcfb54358a24e0db8d7d92e2d686b6d36ab Mon Sep 17 00:00:00 2001 From: Annie Li Date: Fri, 17 Mar 2023 14:40:10 -0700 Subject: [PATCH 2/2] Call make ci-test from workflow --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8bb7164907..9906c674c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -87,7 +87,7 @@ jobs: - uses: stripe/openapi/actions/stripe-mock@master - name: Test - run: yarn && yarn test + run: make ci-test - name: Coveralls run: yarn report && yarn coveralls