# See the documentation for more information:
# https://packit.dev/docs/configuration/
upstream_project_url: https://github.com/martinpitt/python-dbusmock
# HACK: should work without, but propose_downstream fails; https://github.com/packit/packit-service/issues/1511
specfile_path: distro/python-dbusmock.spec
issue_repository: https://github.com/martinpitt/python-dbusmock
copy_upstream_release_description: true
upstream_package_name: python-dbusmock
downstream_package_name: python-dbusmock

actions:
  create-archive:
    - python3 -m build --sdist
    # spec and tarball need to be in the same directory
    - sh -c 'mv dist/*.tar.* distro; ls distro/python_dbusmock-*.tar.*'

srpm_build_deps:
  - python3-build
  - python3-setuptools_scm
  - python3dist(wheel)

jobs:
  - job: copr_build
    trigger: pull_request
    targets:
      - fedora-latest-i386
      - fedora-latest-aarch64
      - fedora-latest-ppc64le
      - fedora-latest-s390x
      - fedora-latest-armhfp
      # needed for tests
      - fedora-all
      - centos-stream-10-x86_64

  - job: tests
    trigger: pull_request
    targets:
      - fedora-all
      - centos-stream-10-x86_64

  - job: propose_downstream
    trigger: release
    dist_git_branches:
      - fedora-all

  - job: koji_build
    trigger: commit
    dist_git_branches:
      - fedora-all

  - job: bodhi_update
    trigger: commit
    dist_git_branches:
      # rawhide updates are created automatically
      - fedora-branched
