Skip to content

Commit

Permalink
fix test workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewelamb committed Dec 7, 2023
1 parent 841de8c commit 4a4567c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/schematic-api-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,10 @@ jobs:
yaml.dump(dict, file)
shell: python

- name: Test the affected projects (unit)
run: |
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& nx affected --target=test"
- name: Test the affected projects (end-to-end)
- name: Test the affected projects (all)
run: |
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& nx affected --target=e2e-test"
&& nx affected --target=test-all"
- name: Build the images of the affected projects
run: |
Expand Down
9 changes: 8 additions & 1 deletion apps/schematic/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,14 @@
"cwd": "apps/schematic/api"
}
},
"e2e-test": {
"test-integration": {
"executor": "nx:run-commands",
"options": {
"command": "poetry run pytest -m 'secrets'",
"cwd": "apps/schematic/api"
}
},
"test-all": {
"executor": "nx:run-commands",
"options": {
"command": "poetry run pytest",
Expand Down
4 changes: 4 additions & 0 deletions apps/schematic/api/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
markers =
synapse: tests that interact with synapse
secrets: tests that require secrets
2 changes: 1 addition & 1 deletion apps/schematic/api/schematic_api/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def csv_to_bytes(path: str) -> str:
"""reads in a csv file and returns as bytes"""
dataframe = pd.read_csv(path)
csv_string = dataframe.to_csv(line_terminator="\r\n", index=False)
csv_string = dataframe.to_csv(lineterminator="\r\n", index=False)
return bytes(csv_string, encoding="utf-8")


Expand Down

0 comments on commit 4a4567c

Please sign in to comment.