Skip to content

Commit

Permalink
feat: add tests action
Browse files Browse the repository at this point in the history
  • Loading branch information
werwolfby committed Apr 6, 2023
1 parent 11f3bcf commit ab4c80e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: tests
on:
push:

jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Setup cache
uses: actions/cache@v2
id: cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('./requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install monitorrent requirements
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-dev.txt

- name: Install pytest requirements
run: pip install codecov pytest-md pytest-emoji

- name: Run pytest
uses: pavelzw/pytest-action@v2
with:
verbose: true
emoji: true
job-summary: true
custom-arguments: '-rw tests'
click-to-expand: false
report-title: 'Test Report'

0 comments on commit ab4c80e

Please sign in to comment.