forked from shibao/cannery
		
	add drone ci
This commit is contained in:
		
							
								
								
									
										28
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
kind: pipeline
 | 
			
		||||
type: docker
 | 
			
		||||
name: cannery
 | 
			
		||||
 | 
			
		||||
cache:
 | 
			
		||||
  mount:
 | 
			
		||||
    - _build
 | 
			
		||||
    - deps
 | 
			
		||||
 | 
			
		||||
steps:
 | 
			
		||||
- name: test
 | 
			
		||||
  image: bitwalker/alpine-elixir-phoenix:1.13
 | 
			
		||||
  environment:
 | 
			
		||||
    TEST_DATABASE_URL: ecto://postgres:postgres@database/cannery_test
 | 
			
		||||
  commands:
 | 
			
		||||
  - mix local.rebar --force
 | 
			
		||||
  - mix local.hex --force
 | 
			
		||||
  - mix deps.get
 | 
			
		||||
  - npm install --prefix assets
 | 
			
		||||
  - mix test
 | 
			
		||||
 | 
			
		||||
services:
 | 
			
		||||
- name: database
 | 
			
		||||
  image: postgres:13
 | 
			
		||||
  environment:
 | 
			
		||||
    POSTGRES_USER: postgres
 | 
			
		||||
    POSTGRES_PASSWORD: postgres
 | 
			
		||||
    POSTGRES_DB: postgres
 | 
			
		||||
@@ -56,3 +56,8 @@ In `prod` mode (or in the Docker container), Cannery will listen for these envir
 | 
			
		||||
- `SECRET_KEY_BASE`: Secret key base used to sign cookies. Must be generated
 | 
			
		||||
  with `mix phx.gen.secret` and set for server to start.
 | 
			
		||||
- `REGISTRATION`: Controls if user sign-up should be invite only or set to public. Set to `public` to enable public registration. Defaults to `invite`.
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
[](https://drone.bubbletea.dev/shibao/cannery)
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@ config :bcrypt_elixir, :log_rounds, 1
 | 
			
		||||
# Run `mix help test` for more information.
 | 
			
		||||
config :cannery, Cannery.Repo,
 | 
			
		||||
  url:
 | 
			
		||||
    System.get_env("DATABASE_URL") ||
 | 
			
		||||
    System.get_env("TEST_DATABASE_URL") ||
 | 
			
		||||
      "ecto://postgres:postgres@localhost/cannery_test#{System.get_env("MIX_TEST_PARTITION")}",
 | 
			
		||||
  pool: Ecto.Adapters.SQL.Sandbox,
 | 
			
		||||
  pool_size: 10
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user