# 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 }}