Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #78 from PatrickLaabs/70-feat-implement-a-test-sui…
Browse files Browse the repository at this point in the history
…te-for-pull-requests

✨ feat: implement a test suite for pull requests
  • Loading branch information
PatrickLaabs authored Mar 14, 2024
2 parents 3f859db + 149faf3 commit 612a364
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 7 deletions.
60 changes: 60 additions & 0 deletions .github/_onhold/pull_request_testsuite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "PR Test Suite"

## ON HOLD

#on:
# push:
# branches:
# - '70-*'
# pull_request:
# types: [opened, reopened, edited]
# pull_request_target:
# types:
# - edited
# - labeled
# - reopened
# - synchronize

env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_MAIL: ${{ github.event.pusher.email }}
GITHUB_USERNAME: ${{ github.actor }}

permissions:
contents: read
packages: write

jobs:
testsuite:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags

- name: Install Task and Build Binary
uses: arduino/setup-task@v2
- run: task build

- name: Testing
uses: engineerd/setup-kind@v0.5.0
with:
version: "v0.22.0"
skipClusterDeletion: true
name: "bootstrapcluster"
image: "kindest/node:v1.27.3"
- run: |
kubectl cluster-info
echo "current-context:" $(kubectl config current-context)
- name: Test Bootstrap Installation
uses: arduino/setup-task@v2
- run: |
task test_bootstrap
- name: Destroy Bootstrap Cluster
uses: arduino/setup-task@v2
- run: |
task destroy_bootstrap
7 changes: 0 additions & 7 deletions Makefile

This file was deleted.

15 changes: 15 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3'

tasks:
build:
cmds:
- go build -o ../frigg main.go

test_bootstrap:
cmds:
- ./main version
- ./main bootstrap capd-controller cluster

destroy_bootstrap:
cmds:
- ./main delete clusters -A
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ import (
)

func main() {

app.Main()

}

0 comments on commit 612a364

Please sign in to comment.