mikeizbicki / cmc-csci143

big data course materials
40 stars 76 forks source link

fix yml file for test #452

Closed giffiecode closed 8 months ago

giffiecode commented 9 months ago

I fixed the .github/workflows/tests.yml by updating this line to docker-compose exec -T pg ./run_tests.sh

however, the docker is still not set up correctly for tests to run in github action. Anyone knows how to solve this issue?

baron-zeng commented 9 months ago

Hey Nico,

You have the -T in the same place as me, and my docker runs fine. What is the error message you are getting?

giffiecode commented 9 months ago
CONTAINER ID   IMAGE          COMMAND                  CREATED                  STATUS                  PORTS      NAMES
4ef87ad5814b   pagila-hw_pg   "docker-entrypoint.s…"   Less than a second ago   Up Less than a second   5432/tcp   pagila-hw_pg_1
sql/01.sql pass
sql/02_function.sql pass
sql/02.sql pass
sql/03.sql pass
sql/04.sql pass
sql/05.sql pass
sql/06.sql pass
sql/07.sql pass
sql/08.sql pass
sql/09.sql fail
sql/10.sql pass
sql/11.sql pass
sql/12.sql pass
sql/13.sql pass
sql/14_function.sql pass
sql/14.sql pass
sql/15_function.sql pass
sql/15.sql pass
sql/16.sql pass
sql/17.sql pass
Error: Process completed with exit code 2.

here's my error message in github action

mikeizbicki commented 9 months ago

The github actions are in fact setup correctly. But you can see from this line

sql/09.sql fail

that your sql code is incorrect. Recall that SQL by default is non-deterministic, which means that things like the order can change arbitrarily when you run in a different environment. The most likely fix is adding a correct ORDER BY clause.