General refactoring of bfabricPy #1462
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: functionalTest | |
concurrency: functional-test-group | |
on: | |
push: | |
branches: [ main ] | |
schedule: | |
- cron: "00 08 * * *" | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- shell: bash | |
name: Create and populate .bfabricrc.py configuration file | |
env: | |
WEBBASE: ${{ secrets.BFABRICWEBBASE }} | |
LOGIN: ${{ secrets.BFABRICLOGIN }} | |
PASSWD: ${{ secrets.BFABRICPASSWD }} | |
run: | | |
echo "_WEBBASE=\""$WEBBASE\" > ~/.bfabricrc.py | |
echo "_LOGIN=\""$LOGIN\" >> ~/.bfabricrc.py | |
echo "_PASSWD=\""$PASSWD\" >> ~/.bfabricrc.py | |
- name: Install latest bfabricPy and dependencies | |
run: | | |
sudo mkdir -p /home/bfabric/prx/ \ | |
&& python -m pip install --upgrade pip \ | |
&& python setup.py sdist \ | |
&& pip install dist/bfabric-*.tar.gz \ | |
- name: Run py lang unittest modules | |
run: | | |
cd ./bfabric/tests/ \ | |
&& python -m unittest test_bfabric_functional.py \ | |
&& python -m unittest test_bfabric_read.py | |
- name: Print 'test_functional.log' (generated by unittest run) | |
run: cat -n bfabric/tests/test_functional.log |