Skip to content

Commit

Permalink
ENT-3759: Test on GitHub Actions
Browse files Browse the repository at this point in the history
* Card ID: ENT-3759

(Adapted from 17e72fe)
  • Loading branch information
m-horky committed Apr 27, 2023
1 parent ffaa077 commit 8d0c501
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 13 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: pytest

on:
pull_request:
workflow_dispatch:

jobs:
pytest:
name: "pytest"

strategy:
fail-fast: false
matrix:
include:
- name: "CentOS 7"
image: "quay.io/centos/centos:centos7"
pytest_args: ''

runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}

steps:
- name: "Checkout repository"
uses: actions/checkout@v3

- name: "Run container-pre-test.sh"
run: |
bash scripts/container-pre-test.sh
- name: "Run nosetest"
run: |
nosetests -v -c playpen/noserc.ci
9 changes: 1 addition & 8 deletions playpen/noserc.ci
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
[nosetests]
with-randomly=True
with-xvfb=True
with-id=True
with-coverage=True
cover-html=True
cover-xml=True
cover-erase=True
with-xunit=True
attr=!zypper,!functional
attr=!zypper,!functional,!gui,!dbus
5 changes: 0 additions & 5 deletions playpen/noserc.dev

This file was deleted.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ python-dateutil==1.5;python_version<="2.7"
python-dateutil>=2.0;python_version>="3.0"

configparser<5
M2crypto
24 changes: 24 additions & 0 deletions scripts/container-pre-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

yum install -y epel-release

# Install essential packages
yum install -y \
git gcc make python python-devel python-setuptools python-pip

# Install system, build and runtime packages
yum install -y \
gtk3-devel python-ethtool \
openssl-devel swig

localedef -c -i en_US -f ISO-8859-1 en_US
localedef -c -i en_US -f UTF-8 en_US.UTF-8
localedef -c -i de_DE -f UTF-8 de_DE.UTF-8
localedef -c -i ja_JP -f UTF-8 ja_JP.UTF-8

# Install test packages
python -m pip install -r test-requirements.txt

# Build the project
python setup.py build
python setup.py build_ext --inplace

0 comments on commit 8d0c501

Please sign in to comment.