Reinstate remaining travis tasks as github actions.

pull/7657/head
Richard Tibbles 2 years ago
parent 1afb3be56a
commit 443a1e41d3
  1. 82
      .github/workflows/c_extensions.yml
  2. 29
      .github/workflows/check_docs.yml
  3. 19
      .github/workflows/check_licenses.yml
  4. 37
      .github/workflows/no_zombies.yml

@ -0,0 +1,82 @@
name: Static dependencies with and without C extensions
on:
push:
pull_request:
paths:
- '**.py'
- 'requirements/base.txt'
- 'requirements/build.txt'
jobs:
c_ext:
name: C Extensions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 2.7
- name: pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-ext-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-ext
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/base.txt
pip install -r requirements/build.txt
pip install -r requirements/test.txt
- name: Check C extensions build and run
run: |
# Ensure that for this Python version, we can actually compile ALL files
# in the kolibri directory
python -m compileall -q kolibri -x py2only
# Until we have staged builds, we will be running this in each and every
# environment even though builds should be done in Py 2.7
make staticdeps
make staticdeps-cext
pip install .
# Start and stop kolibri
coverage run -p kolibri start --port=8081
coverage run -p kolibri stop
# Run just tests in test/
py.test --cov=kolibri --cov-report= --cov-append --color=no test/
no_c_ext:
name: No C Extensions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 2.7
- name: pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-no-ext-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-no-ext
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/base.txt
pip install -r requirements/build.txt
pip install -r requirements/test.txt
- name: Check No C extensions build and run
run: |
# Ensure that for this Python version, we can actually compile ALL files
# in the kolibri directory
python -m compileall -q kolibri -x py2only
# Until we have staged builds, we will be running this in each and every
# environment even though builds should be done in Py 2.7
make staticdeps
pip install .
# Start and stop kolibri
coverage run -p kolibri start --port=8081
coverage run -p kolibri stop
# Run just tests in test/
py.test --cov=kolibri --cov-report= --cov-append --color=no test/

@ -0,0 +1,29 @@
name: Docs
on:
push:
pull_request:
paths:
- 'docs/**'
- 'requirements/docs.txt'
jobs:
docs:
name: Checking docs build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-docs-${{ hashFiles('requirements/docs.txt') }}
restore-keys: |
${{ runner.os }}-pip-docs
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/docs.txt
- name: Check Docs build
run: make docs

@ -0,0 +1,19 @@
name: Licenses
on:
push:
pull_request:
paths:
- 'requirements/*.txt'
jobs:
licenses:
name: Licenses check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
run: python -m pip install --upgrade pip
- name: Check Licenses
run: ./test/conditional/test_licenses.sh

@ -0,0 +1,37 @@
name: No zombie threads
on:
push:
pull_request:
paths:
- '**.py'
- 'requirements/base.txt'
jobs:
zombies:
name: No zombies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.6
- name: pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-base-${{ hashFiles('requirements/base.txt') }}
restore-keys: |
${{ runner.os }}-pip-base
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/base.txt
pip install -r requirements/cext.txt
- name: Check proper shutdown
run: |
pip install .
# ensure kolibri stops within 20 seconds 10 times in a row
./test/ensure_kolibri_stops_within_time.sh 20 10 8082
./test/ensure_no_kolibris_running_on_port.sh 8082
Loading…
Cancel
Save