Merge pull request 'Revert "fix(ci): Dont install dependencies again in test step"' (#86) from install-dependencies-in-ci-test into main
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
Reviewed-on: #86
This commit is contained in:
commit
80e7041146
2 changed files with 2 additions and 4 deletions
|
|
@ -79,6 +79,8 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
# Install hex package manager
|
# Install hex package manager
|
||||||
- mix local.hex --force
|
- mix local.hex --force
|
||||||
|
# Fetch dependencies
|
||||||
|
- mix deps.get
|
||||||
# Run tests
|
# Run tests
|
||||||
- mix test
|
- mix test
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,25 +77,21 @@ defmodule Mv.Membership.Member do
|
||||||
where: [present(:join_date)],
|
where: [present(:join_date)],
|
||||||
message: "cannot be in the future"
|
message: "cannot be in the future"
|
||||||
|
|
||||||
|
|
||||||
# Exit date not before join date
|
# Exit date not before join date
|
||||||
validate compare(:exit_date, greater_than: :join_date),
|
validate compare(:exit_date, greater_than: :join_date),
|
||||||
where: [present([:join_date, :exit_date])],
|
where: [present([:join_date, :exit_date])],
|
||||||
message: "cannot be before join date"
|
message: "cannot be before join date"
|
||||||
|
|
||||||
|
|
||||||
# Phone number format (only if set)
|
# Phone number format (only if set)
|
||||||
validate match(:phone_number, ~r/^\+?[0-9\- ]{6,20}$/),
|
validate match(:phone_number, ~r/^\+?[0-9\- ]{6,20}$/),
|
||||||
where: [present(:phone_number)],
|
where: [present(:phone_number)],
|
||||||
message: "is not a valid phone number"
|
message: "is not a valid phone number"
|
||||||
|
|
||||||
|
|
||||||
# Postal code format (only if set)
|
# Postal code format (only if set)
|
||||||
validate match(:postal_code, ~r/^\d{5}$/),
|
validate match(:postal_code, ~r/^\d{5}$/),
|
||||||
where: [present(:postal_code)],
|
where: [present(:postal_code)],
|
||||||
message: "must consist of 5 digits"
|
message: "must consist of 5 digits"
|
||||||
|
|
||||||
|
|
||||||
# Email validation with EctoCommons.EmailValidator
|
# Email validation with EctoCommons.EmailValidator
|
||||||
validate fn changeset, _ ->
|
validate fn changeset, _ ->
|
||||||
email = Ash.Changeset.get_attribute(changeset, :email)
|
email = Ash.Changeset.get_attribute(changeset, :email)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue