-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
51 additions
and
50 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 |
---|---|---|
|
@@ -20,28 +20,20 @@ jobs: | |
max-parallel: 1 | ||
name: node.js_${{ matrix.node }}_test | ||
steps: | ||
- name: Check CLOUDFLARE_TUNNEL_ID | ||
id: check_tunnel | ||
run: | | ||
if [[ -n "${{ secrets.CLOUDFLARE_TUNNEL_ID }}" ]]; then | ||
echo "::save-state name=useCfTunnel::true" | ||
else | ||
echo "::save-state name=useCfTunnel::false" | ||
fi | ||
- name: Setup cloudflared | ||
if: steps.check_tunnel.outputs.useCfTunnel == 'true' | ||
uses: AnimMouse/setup-cloudflared@v1 | ||
with: | ||
cloudflare_tunnel_credential: | ||
${{ secrets.CLOUDFLARE_TUNNEL_CREDENTIAL }} | ||
cloudflare_tunnel_configuration: | ||
${{ secrets.CLOUDFLARE_TUNNEL_CONFIGURATION }} | ||
cloudflare_tunnel_id: ${{ secrets.CLOUDFLARE_TUNNEL_ID }} | ||
- uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- uses: codetalkio/[email protected] | ||
id: expose-tunnel | ||
with: | ||
service: bore.pub | ||
port: 5001 | ||
- name: Accessing the tunnel url | ||
run: | | ||
echo "Tunnel has been started at '${{ steps.expose-tunnel.outputs.tunnel-url }}'" | ||
- name: NPM install | ||
run: npm install | ||
- name: Install firebase CLI | ||
|
@@ -54,9 +46,8 @@ jobs: | |
- name: mask env paramaters | ||
run: echo "::add-mask::$STRIPE_WEBHOOK_SECRET" | ||
- name: Run tests with coverage | ||
run: npm run test | ||
run: | | ||
export PROXY_URL=${{ steps.expose-tunnel.outputs.tunnel-url }}/demo-project/us-central1/ext-firestore-stripe-payments-handleWebhookEvents | ||
npm run test | ||
env: | ||
STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }} | ||
- name: Shutdown and view logs of cloudflared | ||
if: always() && steps.check_tunnel.outputs.useCfTunnel == 'true' | ||
uses: AnimMouse/setup-cloudflared/shutdown@v1 |
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
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
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
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