-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (36 loc) · 1.2 KB
/
unit_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
name: Unit Tests
on:
pull_request:
push:
branches:
- 'master'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# 3.9+ is not currently supported due to https://github.com/freach/udatetime/issues/32
python-version: ["3.8", "3.9"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install ST2 Test Runner
run: |
python3 -m pip install virtualenv
sudo apt-get update
# Required to get python-ldap wheel building
sudo apt-get install -y --no-install-recommends libsasl2-dev python3-dev libldap2-dev libssl-dev
- name: Run Tests
run: cd $GITHUB_WORKSPACE && ./run_tests.sh
- name: Run pytest with codecov
run: |
pip install -r requirements.txt
pytest tests/enums tests/lib --cov=lib --cov=tests/enums --cov=tests/lib --cov-report xml:coverage.xml
- name: Submit Coverage
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{secrets.CODECOV_TOKEN}}