mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-14 21:56:54 +03:00
84 lines
2.1 KiB
YAML
84 lines
2.1 KiB
YAML
name: 📄 Tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- '*.x'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- '*.md'
|
|
- '*.rst'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- '*.x'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- '*.md'
|
|
- '*.rst'
|
|
jobs:
|
|
tests:
|
|
# runs the test suite
|
|
name: ${{ matrix.name }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
|
|
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
|
|
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
|
|
- name: update pip
|
|
run: |
|
|
pip install -U wheel
|
|
pip install -U setuptools
|
|
python -m pip install -U pip
|
|
|
|
- name: get pip cache dir
|
|
id: pip-cache
|
|
run: echo "::set-output name=dir::$(pip cache dir)"
|
|
|
|
- name: cache pip dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ${{ steps.pip-cache.outputs.dir }}
|
|
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}
|
|
|
|
- run: pip install tox
|
|
- run: tox -e ${{ matrix.tox }}
|
|
|
|
coveralls_finish:
|
|
# check coverage increase/decrease
|
|
needs: tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Coveralls Finished
|
|
uses: AndreMiras/coveralls-python-action@develop
|
|
|
|
deploy:
|
|
# builds and publishes to PyPi
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.7'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install build
|
|
- name: Build package
|
|
run: python -m build
|
|
- name: Publish package
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|