-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding CI #41
Adding CI #41
Conversation
"test:guide:custom": "npm run-script lit && spago test --main Test.Guide.Custom", | ||
"test:guide": "npm-run-all --sequential test:guide:*", | ||
"test:main": "spago test", | ||
"test": "npm-run-all --sequential test:*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate tests that use pg backend because they may cause conflicts related to transaction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I often got error when running test before
| Error: (IntegrityError { code: "23505", column: "", constraint: "pg_type_typname_nsp_index", dataType: "", detail: "Key (typname, typnamespace)=(people, 2200) already exists.", file: "nbtinsert.c", hint: "", internalPosition: "", internalQuery: "", line: "570", message: "duplicate key value violates unique constraint \"pg_type_typname_nsp_index\"", position: "", routine: "_bt_check_unique", schema: "pg_catalog", severity: "ERROR", table: "pg_type", where_: "" })
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a transaction overlapping when the error occured.
↓ postgres logs
db_1 | 2021-02-05 05:30:01.581 UTC [81] LOG: connection received: host=192.168.176.1 port=44946
db_1 | 2021-02-05 05:30:01.581 UTC [82] LOG: connection received: host=192.168.176.1 port=44948
db_1 | 2021-02-05 05:30:01.581 UTC [83] LOG: connection received: host=192.168.176.1 port=44950
db_1 | 2021-02-05 05:30:01.585 UTC [82] LOG: connection authorized: user=init database=purspg
db_1 | 2021-02-05 05:30:01.585 UTC [81] LOG: connection authorized: user=init database=purspg
db_1 | 2021-02-05 05:30:01.586 UTC [83] LOG: connection authorized: user=init database=purspg
db_1 | 2021-02-05 05:30:01.589 UTC [81] LOG: statement: BEGIN TRANSACTION
db_1 | 2021-02-05 05:30:01.590 UTC [81] LOG: statement:
db_1 | DROP TABLE IF EXISTS people;
db_1 | CREATE TABLE people (
db_1 | id INTEGER PRIMARY KEY,
db_1 | name TEXT NOT NULL,
db_1 | age INTEGER
db_1 | );
db_1 | 2021-02-05 05:30:01.592 UTC [82] LOG: statement: BEGIN TRANSACTION
db_1 | 2021-02-05 05:30:01.592 UTC [83] LOG: statement:
db_1 | DROP TABLE IF EXISTS people;
db_1 | CREATE TABLE people (
db_1 | id INTEGER PRIMARY KEY,
db_1 | name TEXT NOT NULL,
db_1 | age INTEGER
db_1 | );
db_1 |
db_1 | DO $$
db_1 | BEGIN
db_1 | IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'account_type') THEN
db_1 | CREATE TYPE ACCOUNT_TYPE as ENUM (
db_1 | 'business',
db_1 | 'personal'
db_1 | );
db_1 | END IF;
db_1 | END$$;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might have been best if it could be split in the code, but it was difficult so I split them using npm-run-all.
@Kamirus How do you think the solution is good?
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"decimal.js": "^10.0.1", | ||
"pg": "^7.6.0", | ||
"pg": "^8.5.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix #39
Thank you for your effort! CI is very much welcome indeed. Also maybe @paluh might know more. |
Thank you for your quick reply!
-> Yes it does. I have never faced any error at the moment (on my local and github actions) since I separated PG tests. |
Cool thank you very much! |
Thanks a lot @hjmtql for this contribution! This is really cool. For a long time we weren't even sure whether it is possible to setup such a CI :-)
I think we can merge this. |
I used docker-compose newly, so I added short notes to README.md |
Great! @hjmtql would you like to add anything else or do you think it's ready to merge? |
nothing. yeah it's ready to merge!
2021年2月7日(日) 2:37 Kamil Listopad <notifications@github.com>:
… Great! @hjmtql <https://github.com/hjmtql> would you like to add anything
else or do you think it's ready to merge?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABUBNTKE4YGERUJR4ZC32K3S5V455ANCNFSM4XEERUEQ>
.
|
It will be easier to maintain and contribute to this awesome library.