Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
8a3f389d
Commit
8a3f389d
authored
Oct 11, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve a bit the example .gitlab-ci.yml for Phoenix
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
987c21f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
doc/ci/examples/test-phoenix-application.md
doc/ci/examples/test-phoenix-application.md
+13
-9
No files found.
doc/ci/examples/test-phoenix-application.md
View file @
8a3f389d
## Test a Phoenix application
This example demonstrates the integration of Gitlab CI with Phoenix,
e
lixir and
p
ostgres.
This example demonstrates the integration of Gitlab CI with Phoenix,
E
lixir and
P
ostgres.
### Add `.gitlab-ci.yml` file to project
...
...
@@ -9,10 +9,10 @@ The following `.gitlab-ci.yml` should be added in the root of your
repository to trigger CI:
```
yaml
image
:
elixir:1.3
.1
image
:
elixir:1.3
services
:
-
postgres:9.
5.3
-
postgres:9.
6
variables
:
MIX_ENV
:
"
test"
...
...
@@ -30,16 +30,17 @@ test:
-
mix test
```
The variables will set the Mix environment to
test
. The
before_script will install
`psql`
, and other phoenix dependencies
and will also
The variables will set the Mix environment to
"test"
. The
`before_script`
will install
`psql`
, some Phoenix dependencies,
and will also
run your migrations.
Finally, the test
script
will run your tests.
Finally, the test
`script`
will run your tests.
### Update the Config Settings
In
`config/test.exs`
, update the database hostname:
```
```
elixir
config
:my_app
,
MyApp
.
Repo
,
hostname:
if
(
System
.
get_env
(
"CI"
),
do
:
"postgres"
,
else
:
"localhost"
),
```
...
...
@@ -49,4 +50,7 @@ config :my_app, MyApp.Repo,
If you do not have any migrations yet, you will need to create an empty
`.gitkeep`
file in
`priv/repo/migrations`
.
**Source**
: https://medium.com/@nahtnam/using-phoenix-on-gitlab-ci-5a51eec81142
### Sources
-
https://medium.com/@nahtnam/using-phoenix-on-gitlab-ci-5a51eec81142
-
https://davejlong.com/ci-with-phoenix-and-gitlab/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment