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 performs automated tests on the official code branch. | |
# Test 1: compiling the source code and building the executable | |
# Test 2: performing the regression tests. | |
name: Python application test | |
on: | |
push: | |
branches: [ "development/digitalTwin" ] | |
pull_request: | |
branches: [ "development/digitalTwin" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build | |
run: | | |
# source venv/bin/activate | |
echo "Compiling SCIANTIX" | |
make | |
ls | |
cd bin | |
echo "in bin" | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: compiled-bin | |
path: ./bin | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download build artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: compiled-bin | |
path: ./bin | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install virtualenv | |
virtualenv venv | |
source venv/bin/activate | |
pip install numpy matplotlib scipy scikit-learn | |
- name: Run tests | |
run: | | |
source venv/bin/activate | |
echo "In Regression" | |
cd regression | |
chmod +x ./../bin/sciantix.x # add the execute permission | |
python3 ./regression.py |