-
Notifications
You must be signed in to change notification settings - Fork 15
65 lines (59 loc) · 2.29 KB
/
tests.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
name: build
on:
schedule:
- cron: '0 11 11 * *'
push:
branches: [ master, dev ]
jobs:
run-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
extra: [ base, io, web, form, plot, sphinx, parallel, all, dev ]
python-version: [ '3.9', '3.10', '3.11' ]
include:
- os: windows-latest
extra: all
python-version: '3.10'
env:
ACTION: "true"
EXTRAS: ${{ matrix.extra }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
STRIPE_PUBLISHABLE_KEY: ${{ secrets.STRIPE_PUBLISHABLE_KEY }}
STRIPE_WEBHOOK_SECRET_KEY: ${{ secrets.STRIPE_WEBHOOK_SECRET_KEY }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Uninstall unwanted libs
run: pip uninstall flask-security
- name: Install Test Dependencies
run: pip install -r requirements/test.pip
- if: matrix.extra == 'base'
name: Install Dependencies
run: pip install -e .
- if: matrix.extra != 'base'
name: Install Dependencies
run: pip install -e .[${{ matrix.extra }}]
- if: matrix.os == 'ubuntu-latest' && (matrix.extra == 'all' || matrix.extra == 'form')
name: Removing previous chrome instances on runner
run: sudo apt purge google-chrome-stable
- if: matrix.os == 'ubuntu-latest' && (matrix.extra == 'all' || matrix.extra == 'form')
name: Installing all necessary packages for selenium
run: pip install chromedriver-autoinstaller selenium pyvirtualdisplay
- if: matrix.os == 'ubuntu-latest' && (matrix.extra == 'all' || matrix.extra == 'form')
name: Install xvfb
run: sudo apt-get install xvfb
- name: Run Test
run: coverage run --source=schedula -m unittest discover -s tests -p 'test_*.py'
- if: matrix.python-version == '3.11' && matrix.extra == 'all' && matrix.os == 'ubuntu-latest'
name: Run Coveralls
run: coveralls --service=github