From 353bd699df22ee95e3f8f31506460607419f904e Mon Sep 17 00:00:00 2001 From: Martin Whitehouse Date: Mon, 8 Aug 2022 18:19:58 +0200 Subject: [PATCH 1/2] Remove azure and default to pull requests,opened/reopened --- .github/workflows/pythonpackage.yml | 4 +- azure-pipelines.yml | 72 ----------------------------- 2 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index c1286585..53f3efd8 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -1,6 +1,8 @@ name: Python package -on: push +on: + pull_request: + types: [opened, reopened] jobs: build: diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 2cc53fdd..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,72 +0,0 @@ -# Python Django -# Test a Django project on multiple versions of Python. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/python - -trigger: -- unstable -- stable -- 0.3 - -pr: -- unstable -- stable -- 0.3 - -pool: - vmImage: ubuntu-latest -strategy: - matrix: - Python38Django32: - PYTHON_VERSION: '3.8' - DJANGO_VERSION: '32' - Python39Django32: - PYTHON_VERSION: '3.9' - DJANGO_VERSION: '32' - Python310Django32: - PYTHON_VERSION: '3.10' - DJANGO_VERSION: '32' - Python38Django4: - PYTHON_VERSION: '3.8' - DJANGO_VERSION: '4' - Python39Django4: - PYTHON_VERSION: '3.9' - DJANGO_VERSION: '4' - Python310Django4: - PYTHON_VERSION: '3.10' - DJANGO_VERSION: '4' - maxParallel: 10 - -steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: '$(PYTHON_VERSION)' - architecture: 'x64' - -- task: PythonScript@0 - displayName: 'Export quicktest.py path' - inputs: - scriptSource: 'inline' - script: | - """Search all subdirectories for `quicktest.py`.""" - from glob import iglob - from os import path - # Python >= 3.5 - quicktest_py = next(iglob(path.join('**', 'quicktest.py'), recursive=True), None) - if not quicktest_py: - raise SystemExit('Could not find quicktest.py for django-helpdesk') - project_location = path.dirname(path.abspath(quicktest_py)) - print('Found quicktest.py in', project_location) - print('##vso[task.setvariable variable=projectRoot]{}'.format(project_location)) - -- script: | - python -m pip install --upgrade pip setuptools wheel - pip install -c constraints-Django$(DJANGO_VERSION).txt -r requirements.txt - pip install -c constraints-Django$(DJANGO_VERSION).txt -r requirements-testing.txt - pip install unittest-xml-reporting - displayName: 'Install prerequisites' - -- script: | - pushd '$(projectRoot)' - python quicktest.py helpdesk - displayName: 'Run tests' From c70092e11387ff7346e51ef53e27e65f2b5ead88 Mon Sep 17 00:00:00 2001 From: Martin Whitehouse Date: Mon, 8 Aug 2022 18:41:57 +0200 Subject: [PATCH 2/2] Remove restrictions Signed-off-by: Martin Whitehouse --- .github/workflows/pythonpackage.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 53f3efd8..72b97cab 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -1,8 +1,6 @@ name: Python package -on: - pull_request: - types: [opened, reopened] +on: [pull_request] jobs: build: