-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (62 loc) · 2.47 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10, 3.11]
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox-travis flake8 tox pytest matplotlib==3.3.4 pytest-cov coveralls
pip install dash-bootstrap-components dash[testing] webdriver_manager selenium
pip install --upgrade setuptools importlib-metadata
pip install -e .
- name: Install Chrome and dependencies
run: |
sudo apt-get update
sudo apt-get install -y google-chrome-stable libnss3 xvfb
# - name: Install Chromedriver
# run: |
# wget http://chromedriver.storage.googleapis.com/106.0.5249.61/chromedriver_linux64.zip
# unzip chromedriver_linux64.zip
# sudo mv chromedriver /usr/local/bin/chromedriver
# sudo chmod +x /usr/local/bin/chromedriver
# - name: Install Chromedriver using webdriver-manager
# run: |
# pip install webdriver-manager
# python -c "from webdriver_manager.chrome import ChromeDriverManager; print(ChromeDriverManager().install())"
- name: Install Chromedriver
run: |
CHROME_VERSION=$(google-chrome --version | awk '{print $3}' | cut -d'.' -f1)
wget https://chromedriver.storage.googleapis.com/${CHROME_VERSION}.0.5249.61/chromedriver_linux64.zip || true
wget https://chromedriver.storage.googleapis.com/${CHROME_VERSION}.0/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/local/bin/chromedriver
sudo chmod +x /usr/local/bin/chromedriver
- name: Run tests with coverage
env:
DISPLAY: :99.0
run: |
Xvfb :99 & sleep 3
pytest --cov=vital_sqi --cov-report=xml --cov-report=term-missing tests
- name: Upload to Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
coveralls-endpoint: https://coveralls.io
path-to-lcov: ./tests # Adjust if necessary