-
Notifications
You must be signed in to change notification settings - Fork 3
74 lines (68 loc) · 2.23 KB
/
smoke_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Smoke Test
permissions:
actions: read
on:
workflow_dispatch: {}
schedule:
- cron: 0 0/2 * * *
env:
RELEASE: 0.6.7
jobs:
build_cli:
name: Build cli from release
runs-on: public-amd64-2xlarge
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-x86_64-unknown-linux.tar.gz
tar -zxf trunk-analytics-cli-x86_64-unknown-linux.tar.gz
chmod +x trunk-analytics-cli
- name: Setup Rust & Cargo
uses: ./.github/actions/setup_rust_cargo
- name: Install Nextest
shell: bash
run: |
cargo install --version 0.9.85 cargo-nextest
- name: Install cmake
shell: bash
run: |
sudo apt-get install cmake -y
- name: Run succeeding test
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io
shell: bash
run: |
./trunk-analytics-cli test \
--org-url-slug trunk-staging-org \
--junit-paths ${{ github.workspace }}/target/**/*junit.xml \
--token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} \
cargo nextest run -p smoke-test --profile ci
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"
}
}
]
}