├── .gitignore ├── test_example.py ├── .buildkite ├── screenshot.png ├── pipeline.yml └── template.yml ├── renovate.json ├── Pipfile ├── LICENSE ├── README.md └── Pipfile.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .cache 2 | __pycache__ -------------------------------------------------------------------------------- /test_example.py: -------------------------------------------------------------------------------- 1 | def incr(x): 2 | return x + 1 3 | 4 | def test_incr(): 5 | assert incr(3) == 4 -------------------------------------------------------------------------------- /.buildkite/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buildkite/python-pipenv-example/HEAD/.buildkite/screenshot.png -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:base" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.buildkite/pipeline.yml: -------------------------------------------------------------------------------- 1 | image: "sorchaabel/python-pipenv-pipeline-example:1.0" 2 | steps: 3 | - label: ":python:" 4 | commands: 5 | - pipenv install --deploy --dev 6 | - pipenv run py.test -------------------------------------------------------------------------------- /Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | url = "https://pypi.python.org/simple" 3 | verify_ssl = true 4 | name = "pypi" 5 | 6 | [requires] 7 | python_version = "3" 8 | 9 | [dev-packages] 10 | pytest = "*" 11 | 12 | [packages] 13 | -------------------------------------------------------------------------------- /.buildkite/template.yml: -------------------------------------------------------------------------------- 1 | name: "Python (pipenv) Example" 2 | description: "An example pipeline that tests a Python project using pipenv for dependency management." 3 | emoji: ":python:" 4 | color: "#EFF9FF" 5 | languages: 6 | - "Python" 7 | steps: 8 | - label: ":pipeline:" 9 | command: "buildkite-agent pipeline upload" 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Buildkite 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Buildkite Python (pipenv) Example 2 | 3 | [![Build status](https://badge.buildkite.com/f685180f6d059ee86697f997693e43237baebe1d0044707587.svg?branch=main)](https://buildkite.com/buildkite/python-pipenv-example/builds/latest?branch=main) 4 | [![Add to Buildkite](https://img.shields.io/badge/Add%20to%20Buildkite-14CC80)](https://buildkite.com/new) 5 | 6 | This repository is an example [Buildkite](https://buildkite.com/) pipeline that tests a [Python](https://python.org) project using [pipenv](https://github.com/kennethreitz/pipenv). 7 | 8 | 👉 **See this example in action:** [buildkite/python-pipenv-example](https://buildkite.com/buildkite/python-pipenv-example/builds/latest?branch=main) 9 | 10 | See the full [Getting Started Guide](https://buildkite.com/docs/guides/getting-started) for step-by-step instructions on how to get this running, or try it yourself: 11 | 12 | [![Add to Buildkite](https://buildkite.com/button.svg)](https://buildkite.com/new) 13 | 14 | 15 | Screenshot of Buildkite Python pipenv example pipeline 16 | 17 | 18 | 19 | 20 | ## How it works 21 | 22 | This example: 23 | - Assumes Python and pipenv are installed on the agent 24 | - Installs dependencies with `pipenv install --deploy --dev` 25 | - Runs tests using `pipenv run py.test` 26 | 27 | Example pipeline step: 28 | ```yml 29 | steps: 30 | - label: ":python: Test" 31 | commands: 32 | - pipenv install --deploy --dev 33 | - pipenv run py.test 34 | ``` 35 | 36 | > 💡 Looking for a Docker-based setup instead? Check out the [Python Docker Example](https://github.com/buildkite/python-docker-example). 37 | 38 | 39 | 40 | ## License 41 | 42 | See [LICENSE](LICENSE) (MIT) 43 | -------------------------------------------------------------------------------- /Pipfile.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_meta": { 3 | "hash": { 4 | "sha256": "e37016d4c4317dff7243e98fc36074884c0a9de4a176d42246c7e5b209e93e5f" 5 | }, 6 | "pipfile-spec": 6, 7 | "requires": { 8 | "python_version": "3" 9 | }, 10 | "sources": [ 11 | { 12 | "name": "pypi", 13 | "url": "https://pypi.python.org/simple", 14 | "verify_ssl": true 15 | } 16 | ] 17 | }, 18 | "default": {}, 19 | "develop": { 20 | "iniconfig": { 21 | "hashes": [ 22 | "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", 23 | "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760" 24 | ], 25 | "markers": "python_version >= '3.8'", 26 | "version": "==2.1.0" 27 | }, 28 | "packaging": { 29 | "hashes": [ 30 | "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", 31 | "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" 32 | ], 33 | "markers": "python_version >= '3.8'", 34 | "version": "==25.0" 35 | }, 36 | "pluggy": { 37 | "hashes": [ 38 | "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", 39 | "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746" 40 | ], 41 | "markers": "python_version >= '3.9'", 42 | "version": "==1.6.0" 43 | }, 44 | "pygments": { 45 | "hashes": [ 46 | "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", 47 | "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b" 48 | ], 49 | "markers": "python_version >= '3.8'", 50 | "version": "==2.19.2" 51 | }, 52 | "pytest": { 53 | "hashes": [ 54 | "sha256:539c70ba6fcead8e78eebbf1115e8b589e7565830d7d006a8723f19ac8a0afb7", 55 | "sha256:7c67fd69174877359ed9371ec3af8a3d2b04741818c51e5e99cc1742251fa93c" 56 | ], 57 | "index": "pypi", 58 | "markers": "python_version >= '3.9'", 59 | "version": "==8.4.1" 60 | } 61 | } 62 | } 63 | --------------------------------------------------------------------------------