forked from ueberauth/guardian
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Elixir CI | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: elixir:1.10.0-slim | ||
env: | ||
MIX_ENV: test | ||
|
||
services: | ||
postgres: | ||
image: postgres | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_USER: postgres | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
apt update -y | ||
apt-get update -y | ||
apt install -y make | ||
apt-get install -y build-essential | ||
- name: Cache mix deps | ||
uses: actions/cache@v1 | ||
with: | ||
path: deps | ||
key: ${{ runner.OS }}-mix-cache-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-mix-cache-${{ env.cache-name }}- | ||
${{ runner.OS }}-mix-cache- | ||
${{ runner.OS }}- | ||
- name: Install Dependencies | ||
run: | | ||
mix local.rebar --force | ||
mix local.hex --force | ||
- name: Cache build | ||
uses: actions/cache@v1 | ||
with: | ||
path: _build | ||
key: ${{ runner.OS }}-build-cache }} | ||
restore-keys: | | ||
${{ runner.OS }}-build-cache- | ||
${{ runner.OS }}- | ||
- name: Build | ||
run: mix do deps.get, compile | ||
|
||
- name: Check formatted | ||
run: mix format --check-formatted | ||
- name: Run Tests | ||
run: mix test | ||
env: | ||
DB_HOST: postgres | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters