Skip to content

Commit

Permalink
Merge pull request #130 from Peefy/ci-add-e2e-tests
Browse files Browse the repository at this point in the history
ci: add e2e tests
  • Loading branch information
Peefy authored Aug 9, 2024
2 parents 39d944d + e25ed94 commit 8f5ba17
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Function KCL e2e tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
GO_VERSION: '1.22'

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Start Function Server
run: |
go run . --insecure --debug &
sleep 10
- name: Setup the Crossplane CLI
run: "curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh"

- name: Run e2e Tests
run: export PATH=$PATH:$PWD && scripts/e2e.sh
9 changes: 9 additions & 0 deletions scripts/e2e.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e

find examples -type f -name "Makefile" -exec sh -c '
dir="{}"
cd "$(dirname "$dir")" || exit
make
' \;

0 comments on commit 8f5ba17

Please sign in to comment.