2020-10-01 03:07:45 +00:00
|
|
|
---
|
|
|
|
name: CI
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: ["opened", "synchronize"]
|
|
|
|
push:
|
|
|
|
branches: ["devel"]
|
|
|
|
jobs:
|
|
|
|
Test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python:
|
|
|
|
- version: 3.6
|
|
|
|
toxenv: py36
|
|
|
|
- version: 3.7
|
|
|
|
toxenv: py37
|
|
|
|
- version: 3.8
|
|
|
|
toxenv: py38
|
2020-11-26 17:54:14 +00:00
|
|
|
- version: 3.9
|
|
|
|
toxenv: py39
|
2020-10-01 03:07:45 +00:00
|
|
|
steps:
|
2020-12-05 17:36:35 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup:python${{ matrix.python.version }}
|
2020-10-01 03:07:45 +00:00
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python.version }}
|
2020-12-05 17:36:35 +00:00
|
|
|
- name: Setup:cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/pip
|
|
|
|
~/.cache/pypoetry/cache
|
|
|
|
~/.poetry
|
|
|
|
# Including the hashed poetry.lock in the cache slug ensures that the cache
|
|
|
|
# will be invalidated, and thus all packages will be redownloaded, if the
|
|
|
|
# lockfile is updated
|
|
|
|
key: ${{ runner.os }}-${{ matrix.python.toxenv }}-${{ hashFiles('**/poetry.lock') }}
|
|
|
|
- name: Setup:env
|
|
|
|
run: .github/scripts/setup-env.sh
|
|
|
|
- name: Run:${{ matrix.python.toxenv }}
|
2021-01-23 00:23:35 +00:00
|
|
|
run: $HOME/ci/bin/tox -e ${{ matrix.python.toxenv }} --require-poetry
|
2020-10-01 03:07:45 +00:00
|
|
|
Check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-12-05 17:36:35 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup:python3.8
|
2020-10-01 03:07:45 +00:00
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: 3.8
|
2020-12-05 17:36:35 +00:00
|
|
|
- name: Setup:cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/pip
|
|
|
|
~/.cache/pypoetry/cache
|
|
|
|
~/.poetry
|
|
|
|
# Hardcoded 'py38' slug here lets this cache piggyback on the 'py38' cache
|
|
|
|
# that is generated for the tests above
|
|
|
|
key: ${{ runner.os }}-py38-${{ hashFiles('**/poetry.lock') }}
|
|
|
|
- name: Setup:env
|
|
|
|
run: .github/scripts/setup-env.sh
|
|
|
|
- name: Run:static
|
2020-12-05 19:58:40 +00:00
|
|
|
run: $HOME/ci/bin/tox -e static --require-poetry
|
2020-12-05 17:36:35 +00:00
|
|
|
- name: Run:static-tests
|
2020-12-05 19:58:40 +00:00
|
|
|
run: $HOME/ci/bin/tox -e static-tests --require-poetry
|
2020-12-05 17:36:35 +00:00
|
|
|
- name: Run:security
|
2020-12-05 19:58:40 +00:00
|
|
|
run: $HOME/ci/bin/tox -e security --require-poetry
|