From 21e48d7a18b17051501f050cabdd6729d5260188 Mon Sep 17 00:00:00 2001 From: Alex Ruddick Date: Tue, 11 Apr 2023 08:33:23 -0500 Subject: [PATCH] Dump Azure in favor of GH Actions --- .github/workflows/python-package.yml | 39 +++++++++++++++++++ azure-pipelines.yml | 57 ---------------------------- 2 files changed, 39 insertions(+), 57 deletions(-) create mode 100644 .github/workflows/python-package.yml delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..dcf9f4f --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,39 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: watlow + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install '.[test]' + - name: Lint with ruff + run: | + ruff . + - name: Check types with mypy + run: | + mypy watlow + - name: Pytest + run: | + pytest diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 93b6673..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,57 +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: -- master - -pool: - vmImage: 'ubuntu-latest' -strategy: - matrix: - Python37: - PYTHON_VERSION: '3.7' - Python38: - PYTHON_VERSION: '3.8' - Python39: - PYTHON_VERSION: '3.9' - Python310: - PYTHON_VERSION: '3.10' - Python311: - PYTHON_VERSION: '3.11' - maxParallel: 3 - -steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: '$(PYTHON_VERSION)' - architecture: 'x64' - -- script: | - python -m pip install --upgrade pip - pip install '.[test]' - displayName: 'Install dependencies' - -- script: | - ruff . - displayName: 'Lint code with ruff' - -- script: | - cd watlow - pytest --junitxml=../reports/test-coverage.xml --cov=. --cov-report=xml - env: - USER_TOKEN: $(USER_TOKEN) - displayName: 'Run tests' - -- task: PublishTestResults@2 - inputs: - testResultsFiles: 'reports/test-coverage.xml' - testRunTitle: '$(Agent.OS) - $(Build.BuildNumber)[$(Agent.JobName)] - Python $(python.version)' - condition: succeededOrFailed() - -- task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: Cobertura - summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml' - reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'