Skip to content

Commit

Permalink
ci: show logs
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Di Giacinto <[email protected]>
  • Loading branch information
mudler committed Oct 6, 2023
1 parent eb7fab1 commit 4176a93
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ jobs:
sudo rm -rf build || true
sudo rm -rf bin || true
sudo rm -rf dist || true
sudo docker logs $(sudo docker ps -q --filter ancestor=localai-tests) > logs.txt
sudo cat logs.txt || true
sudo rm -rf logs.txt
make clean || true
make teardown-e2e || true
docker system prune -f -a --volumes || true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ run-e2e-image:

test-e2e:
@echo 'Running e2e tests'
LOCALAI_API=http://$(E2E_BRIDGE_IP):5390 $(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --flake-attempts 5 -v -r ./tests/e2e
LOCALAI_API=http://$(E2E_BRIDGE_IP):5390/v1 $(GOCMD) run github.com/onsi/ginkgo/v2/ginkgo --flake-attempts 5 -v -r ./tests/e2e

teardown-e2e:
rm -rf ./tests/e2e-fixtures/ggllm-test-model.bin
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var _ = Describe("E2E test", func() {
// Check that the GPU was used
AfterEach(func() {
// Execute docker logs $$(docker ps -q --filter ancestor=localai-tests) as a command and check the output
cmd := exec.Command("/bin/bash", "-xce", "docker logs $$(docker ps -q --filter ancestor=localai-tests)")
cmd := exec.Command("/bin/bash", "-xce", "docker logs $(docker ps -q --filter ancestor=localai-tests)")
out, err := cmd.CombinedOutput()
Expect(err).ToNot(HaveOccurred())
Expect(string(out)).To(ContainSubstring("found 1 CUDA devices"))
Expand All @@ -45,7 +45,7 @@ var _ = Describe("E2E test", func() {
It("streams chat tokens", func() {
models, err := client.ListModels(context.TODO())
Expect(err).ToNot(HaveOccurred())
Expect(models.Models).ToNot(BeEmpty())
Expect(models.Models).ToNot(BeEmpty(), models.Models)

model := models.Models[0].ID
resp, err := client.CreateChatCompletion(context.TODO(), openai.ChatCompletionRequest{
Expand Down

0 comments on commit 4176a93

Please sign in to comment.