-
Notifications
You must be signed in to change notification settings - Fork 13
41 lines (35 loc) · 999 Bytes
/
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
35
36
37
38
39
name: Run and Validate Unit Tests
on:
push:
branches-ignore:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: Execute Unit Tests
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
matrix:
python-version:
- 3.8
os:
- ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install modules
run: |
python -m pip install --upgrade requests
- name: Install pytest module
run: |
python -m pip install pytest pytest-mock responses
- name: Executes Unit Tests
run: python -m tests.test_all
- name: Execute pytests
run: python -m pytest tests/pytest_*.py