Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run it in parallel
- Loading branch information
Showing
1 changed file
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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]) | ||
}) |