Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
added nose task
Browse files Browse the repository at this point in the history
  • Loading branch information
irgalamarr committed Dec 17, 2023
1 parent 545fb2d commit a47f540
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tekton/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,38 @@ spec:
# Delete files and directories starting with .. plus any other character
rm -rf "${WORKSPACE_SOURCE_PATH}"/..?*
fi
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: nose
spec:
description: This task will run nosetests on the provided input.
workspaces:
- name: source
params:
- name: args
description: Arguments to pass to nose
type: string
default: "-v"
- name: database_uri
description: Database connection string
type: string
default: "sqlite:///test.db"
steps:
- name: nosetests
image: python:3.9-slim
workingDir: $(workspaces.source.path)
env:
- name: DATABASE_URI
value: $(params.database_uri)
script: |
#!/bin/bash
set -e
echo "***** Installing dependencies *****"
python -m pip install --upgrade pip wheel
pip install -qr requirements.txt
echo "***** Running nosetests with: $(params.args)"
nosetests $(params.args)

0 comments on commit a47f540

Please sign in to comment.