You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+49
Original file line number
Diff line number
Diff line change
@@ -56,3 +56,52 @@ see the README in that folder for more details.
56
56
57
57
## Submitter ID
58
58
Sheepdog requires the `submitter_id` to be unique per node per project. It means that, the `submitter_id` of all `case` nodes must be unique per project. This constraint was technically enforced by the unique index of `(project_id, submitter_id)` in every node table.
59
+
60
+
## Local Test Run Using CI Scripts
61
+
62
+
If you want to locally replicate what GH Actions is doing more closely, follow
63
+
these steps.
64
+
65
+
Ensure you've run `poetry install`.
66
+
67
+
Ensure you have Postgresql 13 set up and running.
68
+
69
+
Ensure there is a postgres user `postgres`*and*`test` setup with password `test`:
70
+
71
+
```
72
+
CREATE USER postgres WITH PASSWORD 'test';
73
+
```
74
+
75
+
Then run:
76
+
77
+
```bash
78
+
bash tests/ci_setup.sh
79
+
```
80
+
81
+
If the above fails due to postgres errors, your postgresql setup may need some
82
+
fixing, it should finish with the following:
83
+
84
+
```
85
+
Setting up test database
86
+
Dropping old test data
87
+
WARNING:root:Unable to drop test data:(psycopg2.errors.InvalidCatalogName) database "sheepdog_automated_test" does not exist
88
+
89
+
[SQL: DROP DATABASE "sheepdog_automated_test"]
90
+
(Background on this error at: http://sqlalche.me/e/13/f405)
91
+
Creating tables in test database
92
+
Creating indexes
93
+
writing RSA key
94
+
```
95
+
96
+
The WARNING will show up the first time you run this, it's safe to ignore.
97
+
98
+
That sets up the database so if you run into postgres errors, you'll want to
99
+
double check your postgres setup.
100
+
101
+
After that you can run unit tests with:
102
+
103
+
```bash
104
+
bash tests/ci_commands_script.sh
105
+
```
106
+
107
+
> You can see more detailed information on local dev setup in the docs/local_dev_environment.md
0 commit comments