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
18 changes: 14 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:

- name: Unit tests
run: |
sudo go test ./... -coverprofile coverage.out -covermode count
sudo go tool cover -func coverage.out
make test
make test-cov

- name: Quality Gate - Test coverage shall be above threshold
env:
Expand All @@ -45,6 +45,16 @@ jobs:
echo "Failed"
exit 1
fi

acceptance:
name: Acceptance Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5
with:
go-version: "^1.23.4"
- name: Build
run: go build -o privateer ./main.go
run: make -B build

- name: Acceptance tests
run: ./build/github/acceptance_test.sh
39 changes: 39 additions & 0 deletions build/github/acceptance_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/sh

set -x

STATUS=0

./privateer completion
if [ $? -ne 0 ]; then
STATUS=1
fi

./privateer generate-plugin -p ./test/data/CCC.VPC_2025.01.yaml -n example
if [ $? -ne 0 ]; then
STATUS=1
fi

./privateer help
if [ $? -ne 0 ]; then
STATUS=1
fi

./privateer list
if [ $? -ne 0 ]; then
STATUS=1
fi

./privateer run -b ./test/data/
if [ $? -ne 0 ]; then
STATUS=1
fi

./privateer version
if [ $? -ne 0 ]; then
STATUS=1
fi

exit $STATUS


Loading
Loading