1+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
5+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
6+
7+ name : Python application
8+
9+ on :
10+ push :
11+ branches : [ master, wptaction ]
12+ pull_request :
13+ branches : [ master, wptaction ]
14+
15+ permissions :
16+ contents : read
17+
18+ jobs :
19+ build :
20+
21+ runs-on : ubuntu-latest
22+
23+ steps :
24+ - uses : actions/checkout@v3
25+ - name : Set up Python 3.6.8
26+ uses : actions/setup-python@v3
27+ with :
28+ python-version : " 3.6.8"
29+ cache : ' pip'
30+
31+ - name : Install dependencies
32+ run : |
33+ python -m pip install --upgrade pip
34+ sudo apt-get install python3-psutil
35+ sudo apt-get install python3-xvfbwrapper
36+ sudo apt-get install python3-dnspython
37+ sudo apt-get install python3-monotonic
38+ sudo apt-get install python3-tornado
39+ sudo apt-get install python3-fonttools
40+ sudo apt-get install python3-wsaccel
41+ sudo apt-get install pylint
42+
43+ - name : Install/Cache pip dependencies
44+ run : pip install -r .github/workflows/requirements.txt
45+
46+ - name : Analysing the code with pylint
47+ run : |
48+ find -name "*.py" -not -path "./ws4py/*" -exec pylint {} --errors-only \;
49+
50+
51+ - name : Test with pytest
52+ run : |
53+ pytest -vv
54+
55+ # - name: Run a local test # We could add Local Tests here
56+ # run: |
57+ # sudo python3 wptagent.py -vvvv --location Test --xvfb --noidle --testurl 'https://www.google.com/' --testspec testspec.json --testout url --dockerized
58+ # - name: Print Profil # Call a python function to print the profile data or log data after run
59+ # run: |
60+ # python3 test_wptagent.py
0 commit comments