Merge pull request #105 from gregbo/patch-1 #59
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: Python script tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Test Programming Fundamentals Python Part 1 - ex1 | |
run: | | |
cd programming_fundamentals/python_part_1 | |
pip install -r requirements.txt | |
VALUE=$(echo $((1 + RANDOM % 10))) | |
python example1.py $VALUE | |
- name: Test Programming Fundamentals Python Part 2 | |
run: | | |
cd programming_fundamentals/python_part_2 | |
pip install -r requirements.txt | |
python example1.py | |
- name: Test Programming Fundamentals Python Part 3 - ncclient | |
run: | | |
cd programming_fundamentals/python_part_3 | |
pip install -r requirements.txt | |
python api_ncclient_example.py | |
- name: Test Programming Fundamentals Python Part 3 - netmiko | |
run: | | |
cd programming_fundamentals/python_part_3 | |
pip install -r requirements.txt | |
python api_netmiko_example.py | |
- name: Test Programming Fundamentals Python Part 3 - pysnmp | |
run: | | |
cd programming_fundamentals/python_part_3 | |
pip install -r requirements.txt | |
python api_pysnmp_example.py | |
- name: Test Programming Fundamentals Python Part 3 - requests | |
run: | | |
cd programming_fundamentals/python_part_3 | |
pip install -r requirements.txt | |
python api_requests_example.py | |
- name: Test Programming Fundamentals Python Part 3 - data_library_exercises | |
run: | | |
cd programming_fundamentals/python_part_3 | |
pip install -r requirements.txt | |
python data_library_exercises.py | |