Skip to content

Commit

Permalink
Switch to Github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
danschultzer committed Nov 25, 2020
1 parent 5a036ca commit e7eb8fa
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 30 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
push:
pull_request:
release:
types:
- published

jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pow_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
include:
- elixir: 1.11
otp: 23.0
- elixir: 1.7
otp: 22.0.2
- elixir: 1.8
otp: 22.0.2
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-elixir@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- run: mix deps.get
- run: mix test
env:
POSTGRES_URL: ecto://postgres:postgres@localhost/pow_test
- run: MIX_ENV=test mix credo --ignore design.tagtodo
deploy:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
name: Deploy published release
env:
HEX_API_KEY: ${{secrets.HEX_API_KEY}}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-elixir@v1
with:
otp-version: 23.0
elixir-version: 1.11
- run: mix deps.get
- run: mix hex.publish --yes
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ![Pow](assets/logo-full.svg)

[![Build Status](https://travis-ci.org/danschultzer/pow.svg?branch=master)](https://travis-ci.org/danschultzer/pow) [![hex.pm](http://img.shields.io/hexpm/v/pow.svg?style=flat)](https://hex.pm/packages/pow)
![Build Status](https://img.shields.io/github/workflow/status/danschultzer/pow/CI/master) [![hex.pm](http://img.shields.io/hexpm/v/pow.svg?style=flat)](https://hex.pm/packages/pow)

Pow is a robust, modular, and extendable authentication and user management solution for Phoenix and Plug-based apps.

Expand Down
3 changes: 2 additions & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ config :pow, Pow.Test.Phoenix.Endpoint, endpoint_config
config :pow, Pow.Test.Ecto.Repo,
database: "pow_test",
pool: Ecto.Adapters.SQL.Sandbox,
priv: "test/support/ecto/priv"
priv: "test/support/ecto/priv",
url: System.get_env("POSTGRES_URL")

config :mnesia, dir: 'tmp/mnesia'

Expand Down

0 comments on commit e7eb8fa

Please sign in to comment.