refactor: delete cron from controller (#3376) #256
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
name: SmokeTest | |
concurrency: | |
group: ${{ github.ref }}-smoketest | |
cancel-in-progress: true | |
jobs: | |
smoke-test-upgrade-path: | |
name: Smoke Test Upgrade Path | |
if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-all') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
# this might remove tools that are actually needed, | |
# if set to "true" but frees about 6 GB | |
tool-cache: false | |
- name: Checkout the repository with full history | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Get last tagged release | |
run: | | |
latest_release=$(git tag --sort=-v:refname | grep -v v1 | head -n 1) | |
echo "Latest release: $latest_release" | |
echo "LATEST_VERSION=${latest_release#v}" >> "$GITHUB_ENV" | |
- name: Check out the last tagged release | |
uses: actions/checkout@v4 | |
with: | |
ref: v${{ env.LATEST_VERSION }} | |
fetch-depth: 1 | |
fetch-tags: true | |
- name: Init Hermit | |
uses: cashapp/activate-hermit@v1 | |
- name: Build Cache | |
uses: ./.github/actions/build-cache | |
- name: Download Go Modules | |
run: go mod download | |
- name: Set up a kube cluster with the tagged release dockerhub image | |
run: | | |
set -euo pipefail | |
echo "Deploying the tagged release to the cluster" | |
cd deployment && just deploy-version ${{ env.LATEST_VERSION }} && cd .. | |
- name: Build Language Plugins | |
run: just build-language-plugins | |
- name: Smoke test the tagged release images | |
run: | | |
set -euo pipefail | |
echo "Running smoke test on the tagged release images" | |
SKIP_KUBE_FULL_DEPLOY=true go test -v -timeout 15m -tags smoketest -run '^Test' ./smoketest | |
- name: Check out HEAD of the current branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 1 | |
- name: Init Hermit | |
uses: cashapp/activate-hermit@v1 | |
- name: Build Language Plugins | |
run: just build-language-plugins | |
- name: Smoke test HEAD with a full deploy to test upgrade path | |
run: | | |
set -euo pipefail | |
echo "Running smoke test on the HEAD images" | |
OLD_FTL_VERSION=${{ env.LATEST_VERSION }} go test -v -timeout 15m -tags smoketest -run '^Test' ./smoketest | |
- name: Archive Report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: kube-report-smoke-test-upgrade | |
path: /tmp/ftl-kube-report/ | |
- name: Print Disk Space | |
if: always() | |
run: | | |
df |