Skip to content

Commit

Permalink
Add a functional test
Browse files Browse the repository at this point in the history
Run it in parallel
  • Loading branch information
omgjlk committed Dec 8, 2017
1 parent c234708 commit 824e086
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions brigade.js
@@ -1,11 +1,20 @@
const { events, Job } = require("brigadier")
const { events, Job, Group } = require("brigadier")

events.on("pull_request", () => {
var job = new Job("pycodestyle", "python:alpine")
job.tasks = [
var style = new Job("pycodestyle", "python:alpine")
style.tasks = [
"pip install pycodestyle",
"cd /src",
"pycodestyle demoapp"
"pycodestyle -v /src/demoapp"
]
job.run()

var functional = new Job("functional", "python:alpine")
functional.tasks = [
"apk update && apk add curl",
"pip install /src/",
"/usr/local/bin/demoapp &",
"sleep 2",
"curl http://127.0.0.1:8000"
]

Group.runEach([style, functional])
})

0 comments on commit 824e086

Please sign in to comment.