help: s_("Profiles|Your name was automatically set based on your %{provider_label} account, so people you know can recognize you")%{provider_label: attribute_provider_label(:name)}
-elsifcan?(current_user,:update_name,user)
=form.text_field:name,label: s_('Profiles|Full name'),required: true,title: s_("Profiles|Using emojis in names seems fun, but please try to set a status message instead"),wrapper: {class: 'col-md-9 qa-full-name rspec-full-name'},help: s_("Profiles|Enter your name, so people you know can recognize you")
help: s_("Profiles|The ability to update your name has been disabled by your administrator.")
=form.text_field:name,label: s_('Profiles|Full name'),required: true,title: s_("Profiles|Using emojis in names seems fun, but please try to set a status message instead"),wrapper: {class: 'col-md-9 qa-full-name rspec-full-name'},help: s_("Profiles|Enter your name, so people you know can recognize you")
@@ -151,7 +151,7 @@ point `localhost` to `127.0.0.1`.
Great, now we have a local Phoenix Server running our app.
Locally, our application is running in an `iex` session. [iex][iex] stands for Interactive Elixir.
Locally, our application is running in an `iex` session. [iex](https://elixir-lang.org/getting-started/introduction.html#interactive-mode) stands for Interactive Elixir.
In this interactive mode, we can type any Elixir expression and get its result. To exit `iex`, we
need to press `Ctrl+C` twice. So, when we need to stop the Phoenix server, we have to hit `Ctrl+C`
twice.
...
...
@@ -245,17 +245,16 @@ Our test was successful. It's time to push our files to GitLab.
The first step is to create a new file called `.gitlab-ci.yml` in `hello_gitlab_ci` directory of our
project.
- The fastest and easiest way to do this, is to click on **Set up CI** on project's main page:
- The easiest way to do this is to click on **Set up CI/CD** on project's main page:
![Set up CI](img/setup-ci.png)
![Set up CI](img/set_up_ci_v12_6.png)
- On next screen, we can select a template ready to go. Click on **Apply a GitLab CI/CD Yaml
template** and select **Elixir**:
- On the next screen, we can use a template with Elixir tests already included. Click on **Apply a template** and select **Elixir**:
![Select template](img/select-template.png)
![Select template](img/select_template_v12_6.png)
This template file tells GitLab CI/CD about what we wish to do every time a new commit is made.
However, we have to adapt it to run a Phoenix app.
However, we have to adapt it slightly to run a Phoenix app.
- The first line tells GitLab what Docker image will be used.
...
...
@@ -263,21 +262,21 @@ project.
our application? This virtual machine must have all dependencies to run our application. This is
where a Docker image is needed. The correct image will provide the entire system for us.
As a suggestion, you can use [trenpixster's elixir image][docker-image], which already has all
dependencies for Phoenix installed, such as Elixir, Erlang, NodeJS and PostgreSQL:
As we are focusing on testing (not deploying), you can use the [elixir:latest](https://hub.docker.com/_/elixir) docker image, which already has the
dependencies for running Phoenix tests installed, such as Elixir and Erlang:
```yml
image:trenpixster/elixir:latest
image:elixir:latest
```
-At `services` session, we'll only use `postgres`, so we'll delete `mysql` and `redis` lines:
-We'll only use `postgres`, so we can delete the `mysql` and `redis` lines from the `services` section:
```yml
services:
-postgres:latest
```
- Now, we'll create a new entry called `variables`, before `before_script` session:
- Now, we'll create a new section called `variables`, before the `before_script` section:
```yml
variables:
...
...
@@ -288,54 +287,56 @@ project.
MIX_ENV:"test"
```
Here, we are setting up the values for GitLab CI/CD authenticate into PostgreSQL, as we did on
`config/test.exs` earlier.
Above, we set up the values for GitLab CI/CD to authenticate into PostgreSQL, like we did in
`config/test.exs` earlier. The `POSTGRES_USER` and `POSTGRES_PASSWORD` values
are used by the `postgres` service to create a user with those credentials.
- In `before_script` session, we'll add some commands to prepare everything to the test:
- In the `before_script` section, we'll add some commands to prepare everything for the test: