Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 159 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
name: CI

on:
push:
branches: [ development ]
tags: [ "**" ]
pull_request:
branches: [ "**" ]

defaults:
run:
shell: bash

jobs:
# build:
# name: ${{ matrix.task.name}} - ${{ matrix.os.name }} ${{ matrix.python.name }}
# runs-on: ${{ matrix.os.runs-on }}
# strategy:
# fail-fast: false
# matrix:
# os:
# - name: Linux
# runs-on: ubuntu-latest
# python:
# - name: CPython 3.8
# tox: py38
# action: 3.8
# task:
# - name: Build
# tox: build
#
# steps:
# - uses: actions/checkout@v2
# with:
# ref: ${{ github.event.pull_request.head.sha }}
# - name: Set up ${{ matrix.python.name }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python.action }}
#
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip setuptools wheel
# python -m pip install build check-manifest twine
#
# - uses: twisted/python-info-action@v1
#
# - name: Build
# run: |
# check-manifest --verbose .
#
# python -m build --sdist --outdir dist/ .
#
# mkdir empty/
# cd empty
#
# tar -xvf ../dist/*
# cd *
#
# # build the wheel from the sdist
# python -m build --wheel --outdir ../../dist/ .
# cd ../../
#
# twine check dist/*
#
# - name: Publish
# uses: actions/upload-artifact@v2
# with:
# name: dist
# path: dist/

test:
name: ${{ matrix.task.name}} - ${{ matrix.os.name }} ${{ matrix.python.name }}
runs-on: ${{ matrix.os.runs-on }}
# needs:
# - build
strategy:
fail-fast: false
matrix:
os:
- name: Linux
runs-on: ubuntu-latest
python:
- name: CPython 3.6
tox: py36
action: 3.6
- name: CPython 3.7
tox: py37
action: 3.7
- name: CPython 3.8
tox: py38
action: 3.8
- name: CPython 3.9
tox: py39
action: 3.9
- name: PyPy 3.6
tox: pypy36
action: pypy-3.6
- name: PyPy 3.7
tox: pypy37
action: pypy-3.7
task:
- name: Test
tox: test

env:
TOXENV: ${{ matrix.task.tox }}${{ fromJSON('["", "-"]')[matrix.python.tox != null] }}${{ matrix.python.tox }}

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

# - name: Download package files
# uses: actions/download-artifact@v2
# with:
# name: dist
# path: dist/

- name: Set up ${{ matrix.python.name }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python.action }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install tox

- name: Prepare tox environment
run: |
tox --notest

# - name: Prepare tox environment
# run: |
# tox --notest --installpkg dist/*.whl

- name: Runner info
uses: twisted/python-info-action@v1

- name: Tox info
uses: twisted/python-info-action@v1
with:
python-path: .tox/${{ env.TOXENV }}/*/python

- name: Test
run: |
tox --skip-pkg-install

all:
name: All
runs-on: ubuntu-latest
needs:
# - build
- test
steps:
- name: This
shell: python
run: import this
17 changes: 17 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tox]
envlist = test-py{36,37,38,39,py36,py37}

[testenv]
;changedir = {envtmpdir}
skip_install = true

[testenv:test-py{36,37,38,39,py36,py37}]
;extras =
; test
deps =
psutil
pyfakefs
pytest
texttable
commands =
pytest --capture=no --verbose {toxinidir}