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
987c21f5
Commit
987c21f5
authored
Jul 04, 2016
by
Manthan Mallikarjun
Committed by
Rémy Coutable
Oct 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an example for testing a phoenix application with Gitlab CI.
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
73adae0f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
0 deletions
+54
-0
CHANGELOG
CHANGELOG
+1
-0
doc/ci/examples/README.md
doc/ci/examples/README.md
+1
-0
doc/ci/examples/test-phoenix-application.md
doc/ci/examples/test-phoenix-application.md
+52
-0
No files found.
CHANGELOG
View file @
987c21f5
...
@@ -9,6 +9,7 @@ v 8.13.0 (unreleased)
...
@@ -9,6 +9,7 @@ v 8.13.0 (unreleased)
- Add `/projects/visible` API endpoint (Ben Boeckel)
- Add `/projects/visible` API endpoint (Ben Boeckel)
- Fix centering of custom header logos (Ashley Dumaine)
- Fix centering of custom header logos (Ashley Dumaine)
- ExpireBuildArtifactsWorker query builds table without ordering enqueuing one job per build to cleanup
- ExpireBuildArtifactsWorker query builds table without ordering enqueuing one job per build to cleanup
- Add an example for testing a phoenix application with Gitlab CI in the docs (Manthan Mallikarjun)
- AbstractReferenceFilter caches project_refs on RequestStore when active
- AbstractReferenceFilter caches project_refs on RequestStore when active
- Replaced the check sign to arrow in the show build view. !6501
- Replaced the check sign to arrow in the show build view. !6501
- Add a /wip slash command to toggle the Work In Progress status of a merge request. !6259 (tbalthazar)
- Add a /wip slash command to toggle the Work In Progress status of a merge request. !6259 (tbalthazar)
...
...
doc/ci/examples/README.md
View file @
987c21f5
...
@@ -11,6 +11,7 @@ Apart from those, here is an collection of tutorials and guides on setting up yo
...
@@ -11,6 +11,7 @@ Apart from those, here is an collection of tutorials and guides on setting up yo
-
[
Test and deploy a Python application to Heroku
](
test-and-deploy-python-application-to-heroku.md
)
-
[
Test and deploy a Python application to Heroku
](
test-and-deploy-python-application-to-heroku.md
)
-
[
Test a Clojure application
](
test-clojure-application.md
)
-
[
Test a Clojure application
](
test-clojure-application.md
)
-
[
Test a Scala application
](
test-scala-application.md
)
-
[
Test a Scala application
](
test-scala-application.md
)
-
[
Test a Phoenix application
](
test-phoenix-application.md
)
-
[
Using `dpl` as deployment tool
](
deployment/README.md
)
-
[
Using `dpl` as deployment tool
](
deployment/README.md
)
-
[
Blog post about using GitLab CI for iOS projects
](
https://about.gitlab.com/2016/03/10/setting-up-gitlab-ci-for-ios-projects/
)
-
[
Blog post about using GitLab CI for iOS projects
](
https://about.gitlab.com/2016/03/10/setting-up-gitlab-ci-for-ios-projects/
)
-
[
Repositories with examples for various languages
](
https://gitlab.com/groups/gitlab-examples
)
-
[
Repositories with examples for various languages
](
https://gitlab.com/groups/gitlab-examples
)
...
...
doc/ci/examples/test-phoenix-application.md
0 → 100644
View file @
987c21f5
## Test a Phoenix application
This example demonstrates the integration of Gitlab CI with Phoenix, elixir and
postgres.
### Add `.gitlab-ci.yml` file to project
The following
`.gitlab-ci.yml`
should be added in the root of your
repository to trigger CI:
```
yaml
image
:
elixir:1.3.1
services
:
-
postgres:9.5.3
variables
:
MIX_ENV
:
"
test"
before_script
:
# Setup phoenix dependencies
-
apt-get update
-
apt-get install -y postgresql-client
-
mix local.hex --force
-
mix deps.get --only test
-
mix ecto.reset
test
:
script
:
-
mix test
```
The variables will set the Mix environment to test. The
before_script will install
`psql`
, and other phoenix dependencies and will also
run your migrations.
Finally, the test script will run your tests.
### Update the Config Settings
In
`config/test.exs`
, update the database hostname:
```
config :my_app, MyApp.Repo,
hostname: if(System.get_env("CI"), do: "postgres", else: "localhost"),
```
### Add the Migrations Folder
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
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