-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.04 KB
/
unit-test.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
name: Run Unit Tests
on: [push, pull_request]
jobs:
unit-test:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
python-version: ['2.x', '3.x']
name: Python ${{ matrix.python-version }} test
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up dependencies for python-ldap
run: sudo apt-get install libsasl2-dev libldap2-dev libssl-dev
- name: Base requirements for SSM
run: pip install -r requirements.txt
- name: Additional requirements for the unit and coverage tests
run: pip install -r requirements-test.txt
- name: Pre-test set up
run: |
export TMPDIR=$PWD/tmp
mkdir $TMPDIR
export PYTHONPATH=$PYTHONPATH:`pwd -P`
cd test
- name: Run unit tests
run: coverage run --branch --source=ssm,bin -m unittest discover --buffer
- name: Upload coverage to Codecov
uses: codecov/[email protected]