Skip to content

Starship E2E Tests #1049

Starship E2E Tests

Starship E2E Tests #1049

name: Starship E2E Tests
# E2E tests using Starship, run on a schedule
on:
schedule:
- cron: "0 */6 * * *" # every 6 hours
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.21"
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: ""