From 095b2aaafa3206860c36d4632d7b111cc1c1b142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lafr=C3=A9choux?= Date: Sat, 5 Mar 2022 17:20:48 +0100 Subject: [PATCH] Move from Azure Pipelines to GitHub Actions --- .github/workflows/build-release.yml | 50 +++++++++++++++++++++++++++++ azure-pipelines.yml | 41 ----------------------- 2 files changed, 50 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/build-release.yml delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 00000000..ad09db81 --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,50 @@ +name: build +on: + pull_request: + # Run builds nightly to catch incompatibilities with new marshmallow releases + schedule: + - cron: "0 0 * * *" +jobs: + lint: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - run: python -m pip install --upgrade pip wheel + - run: pip install tox + - run: tox -elint + tests: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - {name: '3.7-ma3', python: '3.7', os: ubuntu-latest, tox: py37-marshmallow3} + - {name: '3.10-ma3', python: '3.10', os: ubuntu-latest, tox: py310-marshmallow3} + - {name: '3.10-madev', python: '3.10', os: ubuntu-latest, tox: py310-marshmallowdev} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - run: python -m pip install --upgrade pip wheel + - run: pip install tox + - run: tox -e${{ matrix.tox }} + release: + needs: [lint, tests] + name: PyPI release + if: startsWith(github.ref, 'refs/tags') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: install requirements + run: python -m pip install build twine + - name: build dists + run: python -m build + - name: check package metadata + run: twine check dist/* + - name: publish + run: twine upload -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} dist/* diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index a2a8c776..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,41 +0,0 @@ -trigger: - branches: - include: [dev, test-me-*] - tags: - include: ['*'] - - # Run builds nightly to catch incompatibilities with new marshmallow releases -schedules: -- cron: "0 0 * * *" - displayName: Daily midnight build - branches: - include: - - dev - always: "true" - -resources: - repositories: - - repository: sloria - type: github - endpoint: github - name: sloria/azure-pipeline-templates - ref: refs/heads/sloria - -jobs: -- template: job--python-tox.yml@sloria - parameters: - toxenvs: - - lint - - - py37-marshmallow3 - - py310-marshmallow3 - - py310-marshmallowdev - - - docs - os: linux -- template: job--pypi-release.yml@sloria - parameters: - python: "3.9" - distributions: "sdist bdist_wheel" - dependsOn: - - tox_linux