summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Padilla <jpadilla@webapplicate.com>2020-04-06 09:37:35 -0400
committerJosé Padilla <jpadilla@webapplicate.com>2020-04-06 09:37:35 -0400
commitf2dd84a977298e9b4508e10d136949a7fd41c67c (patch)
tree7d4d8e7f6331444c11e517274cfe31b5b89ca6ca
parent3b14696763243942a89b22c5e894b06ddb02951c (diff)
downloadpyjwt-f2dd84a977298e9b4508e10d136949a7fd41c67c.tar.gz
Rename workflow
-rw-r--r--.github/workflows/.main.yml87
-rw-r--r--.github/workflows/main.yml127
2 files changed, 87 insertions, 127 deletions
diff --git a/.github/workflows/.main.yml b/.github/workflows/.main.yml
deleted file mode 100644
index d0030ac..0000000
--- a/.github/workflows/.main.yml
+++ /dev/null
@@ -1,87 +0,0 @@
----
-name: CI
-
-on:
- push:
- branches: ["master"]
- pull_request:
- branches: ["master"]
- # Allow rebuilds via API.
- repository_dispatch:
- types: rebuild
-
-jobs:
- tests:
- name: "Python ${{ matrix.python-version }}"
- runs-on: "ubuntu-latest"
- env:
- USING_COVERAGE: '3.8'
-
- strategy:
- matrix:
- python-version: ["3.5", "3.6", "3.7", "3.8"]
-
- steps:
- - uses: "actions/checkout@v2"
- - uses: "actions/setup-python@v1"
- with:
- python-version: "${{ matrix.python-version }}"
- - name: "Install dependencies"
- run: |
- set -xe
- python -VV
- python -m site
- python -m pip install --upgrade pip setuptools wheel
- python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
-
- - name: "Run tox targets for ${{ matrix.python-version }}"
- run: "python -m tox"
-
- - name: "Combine coverage"
- run: |
- set -xe
- python -m coverage combine
- python -m coverage xml
- if: "contains(env.USING_COVERAGE, matrix.python-version)"
- - name: "Upload coverage to Codecov"
- if: "contains(env.USING_COVERAGE, matrix.python-version)"
- uses: "codecov/codecov-action@v1"
- with:
- fail_ci_if_error: true
-
- package:
- name: "Build & verify package"
- runs-on: "ubuntu-latest"
-
- steps:
- - uses: "actions/checkout@v2"
- - uses: "actions/setup-python@v1"
- with:
- python-version: "3.8"
-
- - name: "Install pep517 and twine"
- run: "python -m pip install pep517 twine"
- - name: "Build package"
- run: "python -m pep517.build --source --binary ."
- - name: "List result"
- run: "ls -l dist"
- - name: "Check long_description"
- run: "python -m twine check dist/*"
-
- install-dev:
- strategy:
- matrix:
- os: ["ubuntu-latest", "windows-latest", "macos-latest"]
-
- name: "Verify dev env"
- runs-on: "${{ matrix.os }}"
-
- steps:
- - uses: "actions/checkout@v2"
- - uses: "actions/setup-python@v1"
- with:
- python-version: "3.8"
- - name: "Install in dev mode"
- run: "python -m pip install -e .[dev]"
- - name: "Import package"
- run: "python -c 'import jwt; print(jwt.__version__)'"
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0d78aa5..127d177 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,40 +1,87 @@
-# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
-# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
-
-name: Python package
-
-on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
- strategy:
- matrix:
- python-version: [3.5, 3.6, 3.7, 3.8]
-
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v1
- with:
- python-version: ${{ matrix.python-version }}
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install -r requirements.txt
- - name: Lint with flake8
- run: |
- pip install flake8
- # stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- - name: Test with pytest
- run: |
- pip install pytest
- pytest
+---
+ name: CI
+
+ on:
+ push:
+ branches: ["master"]
+ pull_request:
+ branches: ["master"]
+ # Allow rebuilds via API.
+ repository_dispatch:
+ types: rebuild
+
+ jobs:
+ tests:
+ name: "Python ${{ matrix.python-version }}"
+ runs-on: "ubuntu-latest"
+ env:
+ USING_COVERAGE: '3.8'
+
+ strategy:
+ matrix:
+ python-version: ["3.5", "3.6", "3.7", "3.8"]
+
+ steps:
+ - uses: "actions/checkout@v2"
+ - uses: "actions/setup-python@v1"
+ with:
+ python-version: "${{ matrix.python-version }}"
+ - name: "Install dependencies"
+ run: |
+ set -xe
+ python -VV
+ python -m site
+ python -m pip install --upgrade pip setuptools wheel
+ python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
+
+ - name: "Run tox targets for ${{ matrix.python-version }}"
+ run: "python -m tox"
+
+ - name: "Combine coverage"
+ run: |
+ set -xe
+ python -m coverage combine
+ python -m coverage xml
+ if: "contains(env.USING_COVERAGE, matrix.python-version)"
+ - name: "Upload coverage to Codecov"
+ if: "contains(env.USING_COVERAGE, matrix.python-version)"
+ uses: "codecov/codecov-action@v1"
+ with:
+ fail_ci_if_error: true
+
+ package:
+ name: "Build & verify package"
+ runs-on: "ubuntu-latest"
+
+ steps:
+ - uses: "actions/checkout@v2"
+ - uses: "actions/setup-python@v1"
+ with:
+ python-version: "3.8"
+
+ - name: "Install pep517 and twine"
+ run: "python -m pip install pep517 twine"
+ - name: "Build package"
+ run: "python -m pep517.build --source --binary ."
+ - name: "List result"
+ run: "ls -l dist"
+ - name: "Check long_description"
+ run: "python -m twine check dist/*"
+
+ install-dev:
+ strategy:
+ matrix:
+ os: ["ubuntu-latest", "windows-latest", "macos-latest"]
+
+ name: "Verify dev env"
+ runs-on: "${{ matrix.os }}"
+
+ steps:
+ - uses: "actions/checkout@v2"
+ - uses: "actions/setup-python@v1"
+ with:
+ python-version: "3.8"
+ - name: "Install in dev mode"
+ run: "python -m pip install -e .[dev]"
+ - name: "Import package"
+ run: "python -c 'import jwt; print(jwt.__version__)'"