forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
96 lines (89 loc) · 2.94 KB
/
starship-tests.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Starship E2E Tests
# E2E tests using Starship, run on a schedule
on:
# schedule:
# - cron: "0 */6 * * *" # every 6 hours
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}-starship-tests
cancel-in-progress: true
jobs:
e2e-test:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
# Starship Infra setup
# - Connects to k8s cluster with kubeconfig (digital ocean)
# - Creates a new namespace based on the name (deleted in next step)
# - Spins up the infra with the given config file
# - Waits till all nodes are running (timeout 30m)
# - Port forward all ports to localhost for next steps to connect
- name: Setup Test infra
id: starship-action
uses: cosmology-tech/[email protected]
with:
values: tests/starship/configs/ci.yaml
port-forward: true
version: 0.1.42
timeout: 10m
cli-version: 8da948db87cc0ff819d81de3151eeb013b19152c
- name: Run Tests
run: |
cd tests/starship/
make test
# Starship resource cleanup on cluster
- name: Cleanup cluster
if: always()
run: |
helm delete $DEVNET_NAME --debug --namespace $DEVNET_NAMESPACE --wait || true
kubectl delete namespace $DEVNET_NAMESPACE --wait=true || true
env:
DEVNET_NAME: ${{ steps.starship-action.outputs.name }}
DEVNET_NAMESPACE: ${{ steps.starship-action.outputs.namespace }}
sims-notify-success:
needs: [e2e-test]
runs-on: ubuntu-latest
if: ${{ success() }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Get previous workflow status
uses: ./.github/actions/last-workflow-status
id: last_status
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Slack on success
if: ${{ steps.last_status.outputs.last_status == 'failure' }}
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: sdk-sims
SLACK_USERNAME: Sim Tests
SLACK_ICON_EMOJI: ":white_check_mark:"
SLACK_COLOR: good
SLACK_MESSAGE: Starship tests are passing
SLACK_FOOTER: ""
sims-notify-failure:
permissions:
contents: none
needs: [e2e-test]
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- name: Notify Slack on failure
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: sdk-sims
SLACK_USERNAME: Sim Tests
SLACK_ICON_EMOJI: ":skull:"
SLACK_COLOR: danger
SLACK_MESSAGE: Starship tests are failing
SLACK_FOOTER: ""