Skip to content

Commit

Permalink
Works locally with nektos act
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarflakstad committed Jul 3, 2024
1 parent 223ed9a commit f85d986
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/agency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
python-version-file: "agency/.python-version"

- name: Install dependencies
run: poetry install
run: source $VENV & poetry install

- name: Linting & formatting
run: make lint & make fmt-check
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
cached-workspaces: server -> target

- run: |
docker compose -f sqlx-test-docker-compose.yaml run -d -p 5432:5432 --name postgres postgres
docker exec postgres bash -c "until pg_isready; do sleep 1; done"
docker compose -f sqlx-test-docker-compose.yaml run -d -p 5432:5432 --name sqlx_postgres sqlx_postgres
docker exec sqlx_postgres bash -c "until pg_isready; do sleep 1; done"
- name: Tests & coverage
run: cargo llvm-cov test --no-fail-fast --workspace
Expand Down
10 changes: 2 additions & 8 deletions server/sqlx-test-docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
version: "3"

services:
postgres:
build:
context: .
dockerfile: Dockerfile_sqlx
args:
VERSION: 14
sqlx_postgres:
image: postgres:14-alpine
ports:
- 5432
environment:
Expand Down
12 changes: 0 additions & 12 deletions server/tests/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ struct MockAgencyServer {
embeddings_compute_response: EmbeddingsOutput,
}

impl MockAgencyServer {
fn set_pubmed_parent_search_response(&mut self, response: PubmedResponse) {
self.pubmed_parent_search_response = response
}
fn set_pubmed_cluster_search_response(&mut self, response: PubmedResponse) {
self.pubmed_cluster_search_response = response
}
fn set_embeddings_compute_response(&mut self, response: EmbeddingsOutput) {
self.embeddings_compute_response = response
}
}

#[async_trait]
impl AgencyService for MockAgencyServer {
async fn pubmed_parent_search(
Expand Down

0 comments on commit f85d986

Please sign in to comment.