summaryrefslogblamecommitdiff
path: root/.gitlab-ci.yml
blob: 9d6c6d8ccef2313568c3990a431b477e1ea3636a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12



                   







                           
                        







                                        

                              

                                   

                      
                

             


                                                                     

       
                        

                                  









                      
stages:
  - static_analysis
  - deploy

image: elixir:latest

before_script:
  - mix local.rebar --force
  - mix local.hex --force
  - mix deps.get

test:
  stage: static_analysis
  services:
    - postgres:latest
  variables:
    POSTGRES_DB: matrix_app_service_test
    POSTGRES_USER: postgres
    POSTGRES_PASSWORD: postgres
    POSTGRES_HOST: postgres
    POSTGRES_HOST_AUTH_METHOD: trust
  script:
    - MIX_ENV=test mix compile
    - MIX_ENV=test mix ecto.create
    - MIX_ENV=test mix ecto.migrate
    - mix test --cover
  artifacts:
    when: always
    paths:
      - cover
    reports:
      junit: _build/test/lib/matrix_app_service/test-junit-report.xml
      cobertura: coverage.xml

format:
  stage: static_analysis
  script:
    - mix format --check-formatted

pages:
  stage: deploy
  script:
  - mix docs -o public
  artifacts:
    paths:
    - public
  only:
  - master