Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: App tests

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
app-tests:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
environment: demo
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install cosign
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
- name: Install chainsaw
uses: kyverno/action-install-chainsaw@6354895e0f99ab23d3e38d85cf5c71b5dc21d727 # v0.2.13
with:
verify: true
- name: Create kind cluster
uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0
with:
node_image: kindest/node:v1.34.0
cluster_name: kind
- name: Install helm
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
- name: Install crossplane
run: |
set -e
make install-platform
- name: Run app tests
run: |
chainsaw test demo-cluster/test/dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test-Driven Development Applied to Developer Platforms
name: Platform tests

on:
pull_request:
Expand All @@ -8,7 +8,7 @@ concurrency:
cancel-in-progress: true

jobs:
tdd-platform:
platform-tests:
runs-on: ubuntu-latest
permissions:
pull-requests: write
Expand All @@ -33,10 +33,7 @@ jobs:
- name: Install crossplane
run: |
set -e
make all
make install-platform
- name: Run platform tests
run: |
chainsaw test demo-cluster/test/platform
- name: Run app tests
run: |
chainsaw test demo-cluster/test/dev
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ create-cluster:
@echo Creating cluster...
@kind create cluster --image kindest/node:v1.34.0 --wait 1m

crossplane:
install-crossplane:
@echo Deploying crossplane...
@helm upgrade --install crossplane crossplane --repo https://charts.crossplane.io/stable \
--version 2.0.2 \
Expand All @@ -12,17 +12,17 @@ crossplane:
--timeout 15m \
--atomic

crossplane-helm: crossplane
install-crossplane-helm: install-crossplane
@echo Deploying crossplane-helm...
@kubectl apply -n crossplane -f ./demo-cluster/manifests/platform/crossplane-helm/
@echo Waiting...
@kubectl wait -n crossplane --for=condition=Installed providers.v1.pkg.crossplane.io/provider-helm
@kubectl wait -n crossplane --for=condition=Healthy providers.v1.pkg.crossplane.io/provider-helm

crossplane-db: crossplane-helm
install-crossplane-db: install-crossplane-helm
@echo Deploying crossplane-db...
@kubectl apply -n crossplane -f ./demo-cluster/manifests/platform/crossplane-db/

all: crossplane
all: crossplane-helm
all: crossplane-db
install-platform: install-crossplane
install-platform: install-crossplane-helm
install-platform: install-crossplane-db
Loading