steps:
- name: 'python:3.12-alpine'
  entrypoint: 'sh'
  args:
    - '-c'
    - |
      pip install -r requirements.txt
      pip install flake8
      flake8 .

- name: 'python:3.12-alpine'
  entrypoint: 'sh'
  args:
    - '-c'
    - |
      pip install -r requirements.txt
      python -m unittest discover

- name: 'gcr.io/cloud-builders/docker'
  args: ['build', '-t', 'asia-northeast1-docker.pkg.dev/$PROJECT_ID/app-repo/pets:v1', '.']

- name: 'gcr.io/cloud-builders/docker'
  args: ['push', 'asia-northeast1-docker.pkg.dev/$PROJECT_ID/app-repo/pets:v1']

images:
- 'asia-northeast1-docker.pkg.dev/$PROJECT_ID/app-repo/pets:v1'

