I have a Cloud Build trigger which runs only when a new Pull Request is created on master branch of a Github repo.
However, right now, pytest is running on the whole repo, while I require pytest to be run only on files that have been created/edited in the Pull Request.
My cloudbuild file is as follows:
#Testing
steps:
- name: 'python:3.7'
id: Testing
entrypoint: 'bash'
args:
- '-c'
- |
pip install --upgrade pip \
&& pip install -r requirements.txt \
&& pytest **/test_*.py
Any idea how to implement this?