Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

update deps, fix config warnings #7

Closed
wants to merge 2 commits into from
Closed
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
148 changes: 0 additions & 148 deletions .circleci/config.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "mix"
directory: "/"
open-pull-requests-limit: 30
schedule:
interval: "daily"
time: "03:37" # UTC
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: ci

on:
push:
branches:
- master
pull_request:

jobs:
ci:
env:
MIX_ENV: test
strategy:
fail-fast: false
matrix:
include:
- pair:
elixir: '1.14'
otp: '24.3'
lint: lint
- pair:
elixir: '1.14'
otp: '25.0'
lint: lint

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.pair.otp}}
elixir-version: ${{matrix.pair.elixir}}

- uses: actions/cache@v2
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-

- name: NIF deps
run: sudo apt-get install -y build-essential erlang-dev libsodium-dev

- name: Run mix deps.get
run: mix deps.get --only test

- name: Run mix format
run: mix format --check-formatted
if: ${{ matrix.lint }}

- name: Run mix deps.compile
run: mix deps.compile

- name: Run mix compile
run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}

- name: Run credo
run: mix credo --strict
if: ${{ matrix.lint }}

- name: Run mix test
run: mix test

- name: Run dialyzer
run: mix dialyzer
if: ${{ matrix.lint }}
3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
elixir 1.13.1-otp-24
elixir 1.14.1-otp-25
erlang 25.1.2
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
import Config

# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
Expand Down
2 changes: 1 addition & 1 deletion config/dev.exs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use Mix.Config
import Config
2 changes: 1 addition & 1 deletion config/prod.exs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use Mix.Config
import Config
2 changes: 1 addition & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use Mix.Config
import Config

config :cpf, CPF.Support.Repo,
username: System.get_env("POSTGRES_USER") || "postgres",
Expand Down
10 changes: 6 additions & 4 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ defmodule CPF.MixProject do

# Run "mix help compile.app" to learn about applications.
def application do
[]
[
extra_applications: [:logger]
]
end

# Run "mix help deps" to learn about dependencies.
Expand All @@ -35,16 +37,16 @@ defmodule CPF.MixProject do
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:credo, "~> 1.1", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.10", only: [:dev, :test], runtime: false},
{:postgrex, "~> 0.15.0", only: [:test]}
{:postgrex, "~> 0.16.5", only: [:test]}
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
] ++ ecto_deps()
end

defp ecto_deps do
[
{:ecto, "~> 3.2", optional: true},
{:ecto_sql, "~> 3.2", only: [:dev, :test], optional: true}
{:ecto, "~> 3.9", optional: true},
{:ecto_sql, "~> 3.9", only: [:dev, :test], optional: true}
]
end

Expand Down
Loading