summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Segundo2023-10-08 22:44:55 +0200
committerChristian Segundo2024-07-10 18:04:25 +0200
commit4314871517d356eb608aa206cbd23d3c831041ee (patch)
tree72332cbe5f17a0a509c53213cc10a1f1ae9d7c01
parent9ff53495505b8b70971d50ef05b2863a9ce27112 (diff)
downloadpromqlfmt-4314871517d356eb608aa206cbd23d3c831041ee.tar.gz
fix ci
-rw-r--r--.luacheckrc3
-rw-r--r--.styluaignore1
-rw-r--r--Jenkinsfile28
-rw-r--r--Makefile6
4 files changed, 30 insertions, 8 deletions
diff --git a/.luacheckrc b/.luacheckrc
new file mode 100644
index 0000000..1d899d1
--- /dev/null
+++ b/.luacheckrc
@@ -0,0 +1,3 @@
+globals = { "vim", "describe", "it", "after_each", "before_each", "assert" }
+max_line_length = false
+exclude_files = { ".test" }
diff --git a/.styluaignore b/.styluaignore
new file mode 100644
index 0000000..e2d4b95
--- /dev/null
+++ b/.styluaignore
@@ -0,0 +1 @@
+.test/*
diff --git a/Jenkinsfile b/Jenkinsfile
index ad6a568..2f841c3 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,7 +1,10 @@
String cron_string = BRANCH_NAME == "master" ? "@daily" : ""
pipeline {
- agent none
- options { parallelsAlwaysFailFast() }
+ agent any
+ options {
+ ansiColor('xterm')
+ parallelsAlwaysFailFast()
+ }
triggers { cron(cron_string) }
stages {
stage('Lint') {
@@ -11,21 +14,24 @@ pipeline {
alwaysPull true
}
}
- steps { sh 'make lint' }
+ steps {
+ sh 'apk --no-cache add stylua luacheck'
+ sh 'make lint'
+ }
}
stage('Test') {
matrix {
agent {
docker {
- image "${DOCKER_IMAGE}"
+ image "chn2guevara/nvim:${TAG}"
alwaysPull true
- customWorkspace "workspace/${JOB_NAME}/IMAGE/${DOCKER_IMAGE}/"
+ customWorkspace "workspace/${JOB_NAME}/${BUILD_NUMBER}/IMAGE/chn2guevara-nvim-${TAG}/"
}
}
axes {
axis {
- name 'DOCKER_IMAGE'
- values 'chn2guevara/nvim:stable', 'chn2guevara/nvim:nightly'
+ name 'TAG'
+ values 'stable', 'nightly'
}
}
stages {
@@ -48,4 +54,12 @@ pipeline {
}
}
}
+ post {
+ always {
+ step([$class: 'Mailer',
+ notifyEveryUnstableBuild: true,
+ recipients: "christian+jenkins@segundo.io",
+ sendToIndividuals: true])
+ }
+ }
}
diff --git a/Makefile b/Makefile
index 3cae985..4e7fa53 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,14 @@
.PHONY: lint
lint:
stylua -c .
+ luacheck .
.PHONY: test
test:
- nvim --headless -u test/init.lua -c "PlenaryBustedDirectory test/ {minimal_init = 'test/init.lua', sequential = true}"
+ nvim \
+ --headless \
+ -u test/init.lua \
+ -c "PlenaryBustedDirectory test/ {minimal_init = 'test/init.lua', sequential = true}"
.PHONY: clean
clean: