Skip to content

Add GitHub Actions workflow for Python tests #3

Add GitHub Actions workflow for Python tests

Add GitHub Actions workflow for Python tests #3

Workflow file for this run

name: CI for FiLIP
on:
push:
branches:
- "**"
pull_request:
branches:
- main
jobs:
setup:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, 3.10, 3.11]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies using setup.py
run: |
python -m pip install --upgrade pip
pip install -e .[development] # Install dependencies from setup.py
- name: Create .env file
run: |
echo "CB_URL=http://134.130.56.175:1026" > .env
echo "LD_CB_URL=http://134.130.56.175:1027" >> .env
echo "IOTA_URL=http://134.130.56.175:4041/" >> .env
echo "QL_URL=http://134.130.56.175:8668" >> .env
echo "MQTT_BROKER_URL=mqtt://134.130.56.175:1883" >> .env
test:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, 3.10, 3.11]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run unittests
run: |
python -m unittest discover -s tests -p "test_*.py"