diff options
| author | Sergey Shepelev <temotor@gmail.com> | 2020-12-09 20:18:42 +0300 |
|---|---|---|
| committer | Sergey Shepelev <temotor@gmail.com> | 2020-12-13 20:45:47 +0300 |
| commit | e78cfe5d2916541a66e0320e63c09d59da901245 (patch) | |
| tree | 23ef5744507e2be20f3aff1f5c1b9749c5924d18 /.github/workflows | |
| parent | e68ea2062291e4a8eca513c0c4d063e7ada03625 (diff) | |
| download | eventlet-github-ci.tar.gz | |
replace Travis with Github (actions) CIgithub-ci
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/style.yaml | 19 | ||||
| -rw-r--r-- | .github/workflows/test.yaml | 71 |
2 files changed, 90 insertions, 0 deletions
diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml new file mode 100644 index 0000000..6883538 --- /dev/null +++ b/.github/workflows/style.yaml @@ -0,0 +1,19 @@ +name: style +on: + push: + pull_request: +jobs: + style: + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - uses: actions/checkout@v1 + - name: setup python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: 3.x + - name: install tox + run: pip install tox + - name: run tests + run: tox --verbose -e pep8 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..7fed531 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,71 @@ +name: test +on: + push: + pull_request: + schedule: + - cron: "43 7 */14 * *" # every two weeks, time chosen by RNG +jobs: + tox: + continue-on-error: ${{ matrix.ignore-error }} + runs-on: ubuntu-latest + timeout-minutes: 10 + services: + mysql: + image: mysql:5.7 + env: { MYSQL_ALLOW_EMPTY_PASSWORD: yes } + ports: ["3306:3306"] + options: --health-cmd="mysqladmin ping" --health-timeout=5s --health-retries=5 --health-interval=5s + postgres: + image: postgres:13 + env: { POSTGRES_PASSWORD: "secret" } + ports: ["5432:5432"] + options: --health-cmd pg_isready --health-timeout 5s --health-retries 5 --health-interval 5s + env: + EVENTLET_DB_TEST_AUTH: '{"psycopg2": {"host": "localhost", "user": "postgres", "password": "secret"}, "MySQLdb": {"passwd": "", "host": "localhost", "user": "root"}}' + strategy: + fail-fast: false + matrix: + include: + - { py: 2.7, toxenv: py27-epolls, ignore-error: false } + - { py: 2.7, toxenv: py27-poll, ignore-error: false } + - { py: 2.7, toxenv: py27-selects, ignore-error: false } + - { py: 3.5, toxenv: py35-epolls, ignore-error: false } + - { py: 3.5, toxenv: py35-poll, ignore-error: false } + - { py: 3.5, toxenv: py35-selects, ignore-error: false } + - { py: 3.6, toxenv: py36-epolls, ignore-error: false } + - { py: 3.6, toxenv: py36-poll, ignore-error: false } + - { py: 3.6, toxenv: py36-selects, ignore-error: false } + - { py: 3.7, toxenv: py37-epolls, ignore-error: false } + - { py: 3.7, toxenv: py37-poll, ignore-error: false } + - { py: 3.7, toxenv: py37-selects, ignore-error: false } + - { py: 3.8, toxenv: py38-epolls, ignore-error: false } + - { py: 3.8, toxenv: py38-poll, ignore-error: false } + - { py: 3.8, toxenv: py38-selects, ignore-error: false } + - { py: 3.9, toxenv: py39-epolls, ignore-error: false } + - { py: 3.9, toxenv: py39-poll, ignore-error: false } + - { py: 3.9, toxenv: py39-selects, ignore-error: false } + - { py: 3.x, toxenv: ipv6, ignore-error: false } + - { py: pypy2, toxenv: pypy2-epolls, ignore-error: true } + - { py: pypy3, toxenv: pypy3-epolls, ignore-error: true } + + steps: + - name: install system packages + run: sudo apt install -y --no-install-recommends ccache libffi-dev libmysqlclient-dev libpq-dev libssl-dev libzmq3-dev + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + - name: setup python ${{ matrix.py }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.py }} + - name: install tox + # TODO is it redundant? + # python -m pip install --upgrade pip + run: | + pip install codecov tox + - run: env + - run: python -c 'import json,os;print(json.loads(os.environ["EVENTLET_DB_TEST_AUTH"]))' + - name: run tests + run: tox --verbose --verbose -e ${{ matrix.toxenv }} + - name: codecov + run: codecov --flags=$(echo ${{ matrix.toxenv }} |tr -d -- '-.') |
