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
66 changes: 66 additions & 0 deletions .github/workflows/build_centos7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

workflow_dispatch:

jobs:
build_centos:
# GitHub Actions does not currently support CentOS as an official platform, so in order to
# test on this OS we need to run it as a container based on the Ubuntu environment
runs-on: ubuntu-latest

strategy:
matrix:
container: ["centos:7"]

container:
image: ${{ matrix.container }}

steps:
- uses: actions/checkout@v2

- name: Install make and sudo
run: |
yum update -y
yum install -y sudo
yum groupinstall -y "Development Tools"
yum install -y gtk3 libXext libXrender libXtst libX11 libXau libXcursor libXdmcp libXfixes libXi libXmu libXp libXpm libXt

- name: Install requirements
run: |
make deps
make venv
. venv/bin/activate
export PATH=`npm bin`:$PATH
make pythondeps
python -c "import setuptools; print(setuptools.__version__)"
pip --version

- name: Install Firefox
run: |
cd /usr/local
curl -O http://ftp.mozilla.org/pub/firefox/releases/75.0/linux-x86_64/en-US/firefox-75.0.tar.bz2
tar xvjf firefox-75.0.tar.bz2
sudo ln -s /usr/local/firefox/firefox /usr/bin/firefox

- name: Install Simphony-Remote
run: |
. venv/bin/activate
make install

- name: Install development requirements
run: |
. venv/bin/activate
make devdeps
Comment thread
flongford marked this conversation as resolved.

- name: Test python backend
run: |
. venv/bin/activate
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
make pythontest
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@ on:
workflow_dispatch:

jobs:
build:
build_test_ubuntu:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- name: Install Firefox
uses: browser-actions/setup-firefox@latest
with:
firefox-version: "75.0"

- name: Before Install
- name: Install requirements
run: |
firefox --version
make deps
make venv
. venv/bin/activate
Expand All @@ -31,23 +25,36 @@ jobs:
python -c "import setuptools; print(setuptools.__version__)"
pip --version

- name: Install
- name: Install Firefox
uses: browser-actions/setup-firefox@latest
with:
firefox-version: "75.0"

- name: Install Simphony-Remote
run: |
. venv/bin/activate
make install

- name: Before Test
- name: Install development requirements
run: |
. venv/bin/activate
make devdeps

- name: Test
- name: Flake8 checks
run: |
. venv/bin/activate
flake8 .

- name: Build docs
run: |
. venv/bin/activate
make docs

- name: Test
run: |
. venv/bin/activate
make pythontest
make jstest
make docs
make testimages
make testdb
make certs
Expand All @@ -61,7 +68,7 @@ jobs:
sleep 3
DISPLAY=:99 python -m unittest discover -s selenium_tests -t . -v

- name: After Success
- name: Coverage
run: |
pushd jupyterhub
`pwd`/start.sh &
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,16 @@ devdeps:
@echo "Installing test dependencies"
@echo "----------------------------"
pip3 -q install -r dev-requirements.txt -r doc-requirements.txt
sudo apt-get -qq install phantomjs
if [ -f "/etc/lsb-release" ]; then \
sudo apt-get -qq install phantomjs; \
elif [ -f "/etc/centos-release" ]; then \
curl -O https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2; \
tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share; \
sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin; \
fi

# Install geckodriver (for selenium testing)
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
curl -L -O https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
sudo sh -c 'tar -x geckodriver -zf geckodriver-v0.26.0-linux64.tar.gz -O > /usr/bin/geckodriver'
sudo chmod +x /usr/bin/geckodriver
rm geckodriver-v0.26.0-linux64.tar.gz
Expand Down