46 lines
831 B
Groovy
46 lines
831 B
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Pre-Build') {
|
|
steps {
|
|
sh '''mix local.hex --force
|
|
mix local.rebar --force'''
|
|
}
|
|
}
|
|
stage('Build') {
|
|
steps {
|
|
sh '''mix deps.get
|
|
mix compile'''
|
|
}
|
|
}
|
|
stage('Unit') {
|
|
steps {
|
|
sh '''mix ecto.create
|
|
mix ecto.migrate
|
|
mix coveralls --trace --preload-modules'''
|
|
}
|
|
}
|
|
stage('Analysis') {
|
|
parallel {
|
|
stage('Credo') {
|
|
steps {
|
|
sh 'mix credo --strict --only=warnings,todo,fixme,consistency,readability'
|
|
}
|
|
}
|
|
stage('Lint') {
|
|
steps {
|
|
sh 'mix format --check-formatted'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
stage('Save') {
|
|
steps {
|
|
junit '_build/pleroma-junit.xml'
|
|
}
|
|
}
|
|
}
|
|
environment {
|
|
MIX_ENV = 'test'
|
|
}
|
|
} |