From ad2b79dceeab7728be6d866b4641430b46a9b6c5 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Thu, 11 Apr 2024 15:13:07 +0300 Subject: [PATCH] Add `install` workflow This tests that the rule types and profiles are installable. Signed-off-by: Juan Antonio Osorio --- .github/workflows/install.yaml | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/install.yaml diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml new file mode 100644 index 0000000..4b1c0d5 --- /dev/null +++ b/.github/workflows/install.yaml @@ -0,0 +1,54 @@ +--- +# This workflow tests that rule types and profiles are installable +name: Install + +on: + pull_request: + +jobs: + install: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + + - name: Set up Go + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 + with: + check-latest: true + + - name: Run minder server in the background + run: + go run github.com/stacklok/minder/cmd/dev@latest testserver & + + - name: install grpcurl + run: | + go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest + + - name: Persist local configuration + run: | + cat < /tmp/minder.yaml + grpc_server: + host: localhost + port: 8090 + insecure: true + + identity: + cli: + issuer_url: http://localhost:8081 + client_id: minder-cli + EOF + + - name: Create user using grpcul + timeout-minutes: 5 + run: | + # Don't fail the job if the command fails + set +e + + while true; do + grpcurl -plaintext -H "Authorization: Bearer foo" localhost:8090 minder.v1.UserService/CreateUser + if [ $? -eq 0 ]; then + break + fi + sleep 1 + done \ No newline at end of file