-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from wishabi/synthetics
Add optional DD synthetics to smoke-test
- Loading branch information
Showing
1 changed file
with
21 additions
and
6 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: "Smoke Test" | ||
description: "Runs Go smoke tests" | ||
name: 'Smoke Test' | ||
description: 'Runs Go smoke tests' | ||
inputs: | ||
SLACK_CHANNEL_ID: | ||
description: The Slack channel ID(s) to send the data to | ||
|
@@ -10,14 +10,21 @@ inputs: | |
ENV: | ||
description: Environment name used for rollback and Slack messages | ||
required: false | ||
default: "ENV input not provided" | ||
default: 'ENV input not provided' | ||
ROLLBACK_ON_FAIL: | ||
description: Rollback the deployment on smoke test failure (pass 'true') | ||
required: false | ||
default: "false" | ||
default: 'false' | ||
GO_SMOKE: | ||
description: Run go smoke tests | ||
required: false | ||
default: 'true' | ||
DD_SYNTHETIC_IDS: | ||
description: Public IDs of DataDog Synthetic tests to run | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
using: 'composite' | ||
steps: | ||
- name: Set branch variable | ||
id: set-branch | ||
|
@@ -36,10 +43,18 @@ runs: | |
shell: bash | ||
- name: Restore cache | ||
uses: wishabi/github-actions/cache@v0 | ||
- name: Run Smoke Tests | ||
- name: Run Go Smoke Tests | ||
if: inputs.GO_SMOKE == 'true' | ||
run: | | ||
go test ./tests/smoke --tags=smoke | ||
shell: bash | ||
- name: Run DataDog Synthetics | ||
if: inputs.DD_SYNTHETIC_IDS != null | ||
uses: DataDog/[email protected] | ||
with: | ||
api_key: ${{secrets.DD_API_KEY}} | ||
app_key: ${{secrets.DD_APP_KEY}} | ||
public_ids: ${{ inputs.DD_SYNTHETIC_IDS }} | ||
- name: Rollback on failure | ||
if: failure() && inputs.ROLLBACK_ON_FAIL == 'true' | ||
run: | | ||
|