-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.28 KB
/
pytest.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
---
# This action performs pytest testing with coverage reporting
# Name of the action
name: pytest Testing
# Events that trigger the action
on:
push:
pull_request:
workflow_dispatch:
jobs:
pytest:
name: pytest
runs-on: ubuntu-latest
# Set environment variables
env:
DB_NAME: github_profiler.db
PYTHONPATH: ./
steps:
# checkout@v3 action documentation
# https://github.com/marketplace/actions/checkout
- name: Checkout repository
uses: actions/checkout@v3
# setup-python@v3 action documentation
# https://github.com/marketplace/actions/setup-python
- name: Set Python version
uses: actions/setup-python@v3
with:
python-version: '3.10'
# Set PYTHONPATH environment variable
- name: Set PYTHONPATH environment variable
run: |
export PYTHONPATH=$PYTHONPATH:${{ env.PYTHONPATH }}
# Install pytest packages
- name: Install pytest packages
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade -r \
requirements/requirements_pytest.txt
# Perform pytest testing and coverage analysis
- name: pytest
run: |
pytest --verbose --cov-report='term-missing' --cov='.'