Compare commits
10 Commits
d0bbcaacde
...
ff9eb0704c
| Author | SHA1 | Date |
|---|---|---|
|
|
ff9eb0704c | 4 years ago |
|
|
6746b00382 | 4 years ago |
|
|
b616b352fb | 4 years ago |
|
|
f4927a9aec | 4 years ago |
|
|
cbd2203290 | 4 years ago |
|
|
afa3e96853 | 4 years ago |
|
|
e827b2ab1e | 4 years ago |
|
|
a228d3a547 | 4 years ago |
|
|
34b98a95e0 | 4 years ago |
|
|
e78f0ecdcc | 4 years ago |
@ -1,15 +1,20 @@
|
||||
pipeline:
|
||||
build:
|
||||
image: python:3.10.1-slim-buster
|
||||
commands:
|
||||
- pip install --upgrade pip setuptools wheel
|
||||
- pip wheel -r requirements.txt --wheel-dir=wheeldir --find-links=wheeldir
|
||||
- pip install --no-index --find-links=wheeldir -r requirements.txt
|
||||
- flake8 app
|
||||
- mkdir -p coverage
|
||||
- pytest tests/
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
ref:
|
||||
- refs/tags/v*
|
||||
kind: pipeline
|
||||
name: build
|
||||
type: docker
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: python:3.10.1-slim-buster
|
||||
commands:
|
||||
- pip install --upgrade pip setuptools wheel
|
||||
- pip wheel -r requirements.txt --wheel-dir=wheeldir --find-links=wheeldir
|
||||
- pip install --no-index --find-links=wheeldir -r requirements.txt
|
||||
- flake8 app
|
||||
- mkdir -p coverage
|
||||
- pytest tests/
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
# test_hello.py
|
||||
from app import app
|
||||
|
||||
def test_hello():
|
||||
response = app.test_client().get('/')
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.data == b'Hello, World!'
|
||||
Loading…
Reference in new issue