diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..f3d5c415 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..11fc491e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml new file mode 100644 index 00000000..9fb06a60 --- /dev/null +++ b/.github/workflows/elixir.yml @@ -0,0 +1,41 @@ +name: Philomena Build + +on: push + +jobs: + build: + runs-on: ubuntu-latest + container: + image: elixir:1.9.4 + services: + db: + image: postgres:latest + ports: ['5432:5432'] + env: + POSTGRES_PASSWORD: 'postgres' + POSTGRES_USER: 'postgres' + POSTGRES_DB: 'philomena_test' + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: + - uses: actions/checkout@v1 + - name: Install Ubuntu Dependencies + run: | + apt-get update + apt-get -yqq install libpq-dev postgresql-client + - name: Install Dependencies + run: | + mix local.rebar --force + mix local.hex --force + mix deps.get + - name: Run Tests + env: + PGUSER: 'postgres' + PGPASSWORD: 'postgres' + PGDATABASE: 'philomena_test' + PGPORT: 5432 + PGHOST: db + run: mix test diff --git a/config/test.exs b/config/test.exs index 2ebfcb31..63ca1153 100644 --- a/config/test.exs +++ b/config/test.exs @@ -2,10 +2,10 @@ import Config # Configure your database config :philomena, Philomena.Repo, - username: "postgres", - password: "postgres", - database: "philomena_test", - hostname: "localhost", + username: System.get_env("PGUSER"), + password: System.get_env("PGPASSWORD"), + database: System.get_env("PGDATABASE"), + hostname: System.get_env("PGHOST"), pool: Ecto.Adapters.SQL.Sandbox # We don't run a server during test. If one is required,