Smoke Test #711
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
name: Smoke Test | |
permissions: | |
actions: read | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: 0 0/2 * * * | |
env: | |
RELEASE: 0.6.11 | |
jobs: | |
build_cli: | |
name: Smoke test ${{ matrix.platform.name }} cli from release | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
matrix: | |
platform: | |
- name: linux | |
os: public-amd64-2xlarge | |
target: x86_64-unknown-linux-musl | |
download-target: x86_64-unknown-linux | |
- name: macos | |
os: macos-latest | |
target: arm64-apple-darwin | |
download-target: aarch64-apple-darwin | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Release | |
run: | | |
curl -fsSLO --retry 3 https://github.com/trunk-io/analytics-cli/releases/download/${{ env.RELEASE }}/trunk-analytics-cli-${{ matrix.platform.download-target }}.tar.gz | |
tar -zxf trunk-analytics-cli-${{ matrix.platform.download-target }}.tar.gz | |
chmod +x trunk-analytics-cli | |
- name: Setup Run Smoke Tests - ${{ matrix.platform.name }} | |
uses: ./.github/actions/setup_run_smoke_tests | |
- name: Run Smoke Tests - ${{ matrix.platform.name }} | |
uses: ./.github/actions/perform_smoke_test | |
with: | |
cli-binary-location: trunk-analytics-cli | |
staging-api-token: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} | |
production-api-token: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }} | |
slack-workflow-status: | |
if: always() && needs.build_cli.result != 'success' | |
name: Post Smoke Test Failure | |
needs: | |
- build_cli | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }} | |
steps: | |
- name: Analytics Cli Smoke Test Failure | |
uses: slackapi/slack-github-action@v1 | |
with: | |
channel-id: production-notifications | |
payload: | | |
{ | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": "Release ${{ env.RELEASE }} of the analytics cli is broken! The job attempting a simple upload had a result of ${{ needs.build_cli.result }}. Runs can be found at https://github.com/trunk-io/analytics-cli/actions/workflows/smoke_test.yml" | |
} | |
} | |
] | |
} |