Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

on: [push, pull_request]
name: CI

Expand Down Expand Up @@ -79,7 +78,6 @@ jobs:
name: Docker
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@master
with:
fetch-depth: 2
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3'
version: "3"
services:
web:
build: .
Expand All @@ -20,7 +20,9 @@ services:
env_file:
- .env
db:
image: postgres:alpine
build:
context: .
dockerfile: ./postgres/Dockerfile
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
Expand Down
4 changes: 4 additions & 0 deletions postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM postgres:alpine
EXPOSE 5432

COPY ./postgres/install_extensions.sql /docker-entrypoint-initdb.d/
1 change: 1 addition & 0 deletions postgres/install_extensions.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
16 changes: 16 additions & 0 deletions src/test/fakes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ impl<'a> FakeRelease<'a> {
}
}

pub(crate) fn downloads(mut self, downloads: i32) -> Self {
self.cratesio_data.downloads = downloads;
self
}

pub(crate) fn description(mut self, new: impl Into<String>) -> Self {
self.package.description = Some(new.into());
self
}

pub(crate) fn release_time(mut self, new: time::Timespec) -> Self {
self.cratesio_data.release_time = new;
self
}

pub(crate) fn name(mut self, new: &str) -> Self {
self.package.name = new.into();
self.package.id = format!("{}-id", new);
Expand All @@ -82,6 +97,7 @@ impl<'a> FakeRelease<'a> {
}

pub(crate) fn build_result_successful(mut self, new: bool) -> Self {
self.has_docs = new;
self.build_result.successful = new;
self
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl TestDatabase {
conn.batch_execute(&format!(
"
CREATE SCHEMA {0};
SET search_path TO {0};
SET search_path TO {0}, public;
",
schema
))?;
Expand Down
Loading