mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 09:14:46 +01:00
4d75323ac3
* chore: tune up the hobby deploy testing * quick fix * put everything in the class * include release tag in name * split this out into stages for GA * test throwing ci off * fix * test destroy * check env * exit if things don't work out * debug * somewhat important to create the dns record here hah * record name as well * maybe? * update user_data * set dns ttl to 30 sec * silly dns mistake * correct DNS error
51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
# This workflow runs e2e smoke test for hobby deployment
|
|
# To check on the status of the instance if this fails go to DO open the instance
|
|
# Instance name should look like `do-ci-hobby-deploy-xxxx`
|
|
# SSH onto the instance and `tail -f /var/log/cloud-init-output.log`
|
|
name: e2e - hobby smoke test
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'release-*.*'
|
|
pull_request:
|
|
paths:
|
|
- docker-compose.base.yml
|
|
- docker-compose.hobby.yml
|
|
- bin/*
|
|
- docker/*
|
|
- .github/workflows/ci-hobby.yml
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
changes:
|
|
runs-on: ubuntu-latest
|
|
# this is a slow one
|
|
timeout-minutes: 30
|
|
name: Setup DO Hobby Instance and test
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.8'
|
|
cache: 'pip' # caching pip dependencies
|
|
cache-dependency-path: '**/requirements*.txt'
|
|
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
|
|
- name: Get python deps
|
|
run: pip install python-digitalocean==1.17.0 requests==2.28.1
|
|
- name: Setup DO Hobby Instance
|
|
run: python3 bin/hobby-ci.py create
|
|
env:
|
|
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
|
- name: Run smoke tests on DO
|
|
run: python3 bin/hobby-ci.py test $GITHUB_HEAD_REF
|
|
env:
|
|
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
|
- name: Post-cleanup step
|
|
if: always()
|
|
run: python3 bin/hobby-ci.py destroy
|
|
env:
|
|
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|