-
Notifications
You must be signed in to change notification settings - Fork 7
34 lines (28 loc) · 1.01 KB
/
unit-testing.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
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Unit testing
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
# FIXME: it would be great to use cache to avoid re-creating the virtualenv
# and installing dependencies every time. We know the syphar/restore-virtualenv@v1 and
# syphar/restore-pip-download-cache@v1 actions, but it seems it only works if
# dependencies are in requeriments.txt file (and in this case we have them in setup.py)
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Install pytest tool
run: pip install pytest==7.2.0
- name: Install library dependencies
run: pip install -e python-lib/tc_etl_lib
- name: Test with pytest
run: pytest -v python-lib/tc_etl_lib/