Skip to content

Commit

Permalink
add pytest-html testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Apr 19, 2022
1 parent 53041ea commit 377efb7
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/cython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
jobs:
# This workflow contains a single job called "build"
cython:
name: Test ${{ matrix.python_version }} ${{ matrix.os }} ${{ matrix.extra_cflags }}
name: Cython ${{ matrix.python_version }} ${{ matrix.os }} ${{ matrix.extra_cflags }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/pytest-html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: pytest-html

on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
- cron: "0 2 * * 0"

jobs:
test_python:
name: pytest-html ${{ matrix. }}
name: pytest-html ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
name: py38-ubuntu
python-version: 3.8

- os: windows-latest
name: py38-windows
python-version: 3.8

- os: ubuntu-latest
name: pypy3-ubuntu
python-version: pypy3.8-nightly

- os: windows-latest
name: pypy3-windows
python-version: pypy3.8

steps:
- name: Set Newline Behavior
run : git config --global core.autocrlf false
- uses: actions/checkout@v3

- uses: actions/checkout@v3
with:
fetch-depth: 1
repository: pytest-dev/pytest-html
path: repo

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix['python-version'] }}

- name: Install tox
run: python -m pip install --upgrade tox

- name: Get Tox Environment Name From Matrix Name
uses: rishabhgupta/split-by@v1
id: split-matrix-name
with:
string: '${{ matrix.name }}'
split-by: '-'

- name: Test with tox
run: cd repo && python -m tox -e ${{ steps.split-matrix-name.outputs._0}}-cov

0 comments on commit 377efb7

Please sign in to comment.