Pull workable #939
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Test | |
on: | |
workflow_dispatch: | |
inputs: | |
log_level: | |
description: "Log level" | |
required: false | |
default: "warning" | |
type: choice | |
options: | |
- error | |
- warning | |
- info | |
- debug | |
push: | |
branches: | |
- dev | |
- beta | |
- prod | |
pull_request: | |
branches: | |
- dev | |
- beta | |
- prod | |
jobs: | |
unittest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
include: | |
- os: ubuntu-latest | |
path: ~/.cache/pip | |
- os: windows-latest | |
path: ~\AppData\Local | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: 3.7 | |
architecture: x64 | |
- uses: actions/cache@v2 | |
id: cache-pip | |
with: | |
path: ${{ matrix.path }} | |
key: ${{ runner.os }}-pip-cache-${{ hashFiles('**/setup.cfg') }} | |
restore-keys: | | |
${{ runner.os }}-pip-cache | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Install silex_client | |
run: pip install -e .[dev] | |
- name: Run unit tests | |
run: python -m pytest . |