Changes: - Update config and docs to reference 3.6 - Add backports of dataclasses and datetime.fromisoformat for python_version<"3.7" - Support both 3.7 and 3.6 usages of undocumented __origin__ attribute on typing objects - Make github ci run tests for python 3.6 as well
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
build-p36:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.6
|
|
- uses: dschep/install-pipenv-action@v1
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt install protobuf-compiler libprotobuf-dev
|
|
pipenv install --dev
|
|
- name: Run tests
|
|
run: |
|
|
cp .env.default .env
|
|
pipenv run pip install -e .
|
|
pipenv run generate
|
|
pipenv run test
|
|
|
|
build-p37:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.7
|
|
- uses: dschep/install-pipenv-action@v1
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt install protobuf-compiler libprotobuf-dev
|
|
pipenv install --dev
|
|
- name: Run tests
|
|
run: |
|
|
cp .env.default .env
|
|
pipenv run pip install -e .
|
|
pipenv run generate
|
|
pipenv run test
|
|
- name: Build package
|
|
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
|
|
run: pipenv run python setup.py sdist
|
|
- name: Publish package
|
|
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
|
|
uses: pypa/gh-action-pypi-publish@v1.0.0a0
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.pypi }}
|