-
Notifications
You must be signed in to change notification settings - Fork 16
51 lines (50 loc) · 1.77 KB
/
unit_tests_with_latest_deps.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
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
name: Unit Tests - Latest Dependencies
jobs:
unit_tests:
name: Unit Tests - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]
steps:
- name: Set up python ${{ matrix.python_version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Build source distribution
run: make package_autonormalize
- name: Install package with test requirements
run: |
sudo python -m pip config --site set global.progress_bar off
python -m pip install --upgrade pip
sudo apt update && sudo apt install -y graphviz
python -m pip install -e unpacked_sdist/
python -m pip install -r unpacked_sdist/test-requirements.txt
- if: ${{ matrix.python_version == 3.7 }}
name: Run unit tests with code coverage
run: |
python -m pip install "$(cat dev-requirements.txt | grep codecov)"
coverage erase
cd unpacked_sdist/
coverage erase
pytest autonormalize/ -n 2 --cov=autonormalize --cov-config=../.coveragerc
env:
PYARROW_IGNORE_TIMEZONE: 1
ALTERYX_OPEN_SRC_UPDATE_CHECKER: False
- if: ${{ matrix.python_version == 3.7 }}
name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}