Skip to content

Commit

Permalink
Add sandbox test and flytectl-release gh workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario committed May 13, 2024
1 parent f960622 commit 127c6e2
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 13 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,59 @@ jobs:
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}
FLYTE_BOT_USERNAME: ${{ secrets.FLYTE_BOT_USERNAME }}

dry_run_goreleaser:
name: Dry Run Goreleaser
runs-on: ubuntu-latest
needs:
- unpack-envvars
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: "0"
- uses: actions/setup-go@v4
with:
go-version: ${{ needs.unpack-envvars.outputs.go-version }}
- name: Run GoReleaser dry run
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser-pro
version: latest
args: --snapshot --skip-publish --rm-dist -f flytectl/.goreleaser.yml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

sandbox:
name: Test Getting started
runs-on: ubuntu-latest
defaults:
run:
working-directory: flytectl
needs:
- unpack-envvars
steps:
- uses: insightsengineering/disk-space-reclaimer@v1
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ needs.unpack-envvars.outputs.go-version }}
- name: Build Flytectl binary
run: make compile
- name: Create a sandbox cluster
run: |
bin/flytectl demo start
- name: Setup flytectl config
run: bin/flytectl config init
- name: Register cookbook
run: bin/flytectl register examples -d development -p flytesnacks
- name: Teardown Sandbox cluster
run: bin/flytectl demo teardown
24 changes: 11 additions & 13 deletions .github/workflows/flytectl-release.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
name: Flytectl checks
name: Flytectl release

on:
pull_request:
paths-ignore:
- "docs/**"
- "boilerplate/**"
push:
tags:
- flytectl/v*.*.*

jobs:
dry_run_goreleaser:
name: Dry Run Goreleaser
release:
name: Goreleaser
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- uses: actions/setup-go@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Run GoReleaser dry run
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser-pro
version: latest
args: --snapshot --skip-publish --rm-dist -f flytectl/.goreleaser.yml
args: release --rm-dist -f flytectl/.goreleaser.yml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

0 comments on commit 127c6e2

Please sign in to comment.