Skip to content

Commit

Permalink
Add CI starter workflows
Browse files Browse the repository at this point in the history
fixes #782
  • Loading branch information
ivotron committed Jun 4, 2020
1 parent 010aa02 commit 41cd379
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Examples

This folder contains examples on how to make use of Popper in distinct
contexts:

* [Continuous Integration (CI)](./ci/). A list of starter workflows
for using Popper to continuously test your project.
19 changes: 19 additions & 0 deletions examples/ci/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# CI workflow starters

A list of examples that can be used as starter points for automating
CI workflows with Popper.

## CI Service Setup

You can use the `popper` tool to generate configuration files that are
consumed by a CI service to automatically run a workflow. Assuming you
place the starter workflow on the root of your repository, you can
generate a CI configuration file by doing:

```bash
popper ci --file ci.yml <SERVICE>
```

Where `SERVICE` is the name of a supported service (Travis, CircleCI,
Jenkins and Gitlab are supported). See more in [Popper
documentation](../docs/sections/cli_features.md#continuously-validating-a-workflow).
30 changes: 30 additions & 0 deletions examples/ci/cpp-conan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
steps:
- id: dev-init
uses: docker://conanio/gcc72:1.25.2
runs: [bash]
args:
- -c
- |
rm -rf build
mkdir -p build
cd build
conan install ../ --build=missing
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
- id: build
uses: docker://conanio/gcc72:1.25.2
runs: [bash]
args:
- -c
- |
cd build/
cmake --build .
- id: test
uses: docker://conanio/gcc72:1.25.2
runs: [bash]
args:
- -c
- |
cd build/
make test
12 changes: 12 additions & 0 deletions examples/ci/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
steps:
- id: get deps
uses: docker://golang:1.14.4-alpine3.11
args: [go, get, -v, -t, -d, ./...]

- name: build
uses: docker://golang:1.14.4-alpine3.11
args: [go, build, -v, .]

- name: test
uses: docker://golang:1.14.4-alpine3.11
args: [go, test, -v, .]
12 changes: 12 additions & 0 deletions examples/ci/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
steps:
- id: install
uses: docker://node:12-alpine
args: [yarn, install]

- id: build
uses: docker://node:12-alpine
args: [yarn, build]

- id: test
uses: docker://node:12-alpine
args: [yarn, test]

0 comments on commit 41cd379

Please sign in to comment.