generated from bellanov/python-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.yaml
40 lines (31 loc) · 993 Bytes
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
steps:
- id: Unit Tests
name: python:3.9-buster
entrypoint: bash
args:
- '-c'
- |
# Substitute tag name / version
sed -i 's/v1.2.3/'$TAG_NAME'/g' setup.cfg
# Install dependencies
pip install -r requirements.txt --user
# Execute build workflow
python -m pytest
# Capture test results
# cp coverage/junit.xml ${_PROJECT_NAME}_${TAG_NAME}_${SHORT_SHA}_test_log.xml
- id: Publish
name: gcr.io/google.com/cloudsdktool/cloud-sdk:alpine
entrypoint: bash
args:
- '-c'
- |
echo "Establishing test results..."
# echo ${_PROJECT_NAME}_${TAG_NAME}_${SHORT_SHA}_test_log.xml
echo "Publishing test results..."
# gsutil cp ${_PROJECT_NAME}_${TAG_NAME}_${SHORT_SHA}_test_log.xml gs://${_LOG_BUCKET}/${_LANGUAGE}/
options:
logging: CLOUD_LOGGING_ONLY
substitutions:
_LOG_BUCKET: alx-fis3g-release-logs
_LANGUAGE: python
_PROJECT_NAME: python_template