-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
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
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
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 | ||
|