-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Full in pyproject.toml and Poetry (#289)
* Full in pyproject.toml and Poetry * skip cache for 3.6 on win
- Loading branch information
1 parent
2e27988
commit 7371e52
Showing
39 changed files
with
407 additions
and
536 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
name: Nightly tests | ||
|
||
on: | ||
schedule: | ||
- cron: '1 0 * * *' # Run daily at 0:01 UTC | ||
|
||
jobs: | ||
tests: | ||
if: github.repository_owner == 'pytest-dev' | ||
uses: ./.github/workflows/test.yml |
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,34 @@ | ||
name: publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.9" | ||
- name: Install poetry | ||
run: curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Configure poetry | ||
run: poetry config virtualenvs.in-project true | ||
- name: Set up cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: venv- | ||
- name: Install Dependencies | ||
run: poetry install | ||
- name: Publish | ||
run: >- | ||
poetry publish | ||
--build | ||
--username __token__ | ||
--password ${{ secrets.PYPI_TOKEN }} |
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,100 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags-ignore: | ||
- v* | ||
pull_request: | ||
workflow_call: | ||
|
||
env: | ||
PYTEST_ADDOPTS: "-m 'not (edge or safari)'" | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy-3.8"] | ||
os: [ubuntu-latest, windows-latest] | ||
include: | ||
- python: "3.6" | ||
tox_env: "py36" | ||
- python: "3.7" | ||
tox_env: "py37" | ||
- python: "3.8" | ||
tox_env: "py38" | ||
- python: "3.9" | ||
tox_env: "py39" | ||
- python: "3.10" | ||
tox_env: "py310" | ||
- python: "pypy-3.8" | ||
tox_env: "pypy3" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install tox | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Setup Firefox | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: browser-actions/setup-firefox@latest | ||
with: | ||
firefox-version: latest | ||
|
||
- name: Setup Geckodriver | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: browser-actions/setup-geckodriver@latest | ||
|
||
- name: Setup Chrome | ||
uses: browser-actions/setup-chrome@latest | ||
with: | ||
chrome-version: stable | ||
|
||
- name: Setup Chromedriver | ||
uses: nanasess/setup-chromedriver@master | ||
|
||
- name: Cache tox environments | ||
if: matrix.os != 'windows-latest' && matrix.python != '3.6' | ||
uses: actions/cache@v3 | ||
with: | ||
path: .tox | ||
key: tox-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }} | ||
|
||
- name: Test | ||
if: matrix.os == 'ubuntu-latest' | ||
run: tox -e ${{ matrix.tox_env }} | ||
|
||
- name: Test (skip firefox on windows) | ||
if: matrix.os == 'windows-latest' | ||
env: | ||
PYTEST_ADDOPTS: "-m 'not (edge or safari or firefox)'" | ||
run: tox -e ${{ matrix.tox_env }} | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Run tests | ||
run: "tox -e docs" |
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 |
---|---|---|
@@ -1,15 +1,20 @@ | ||
repos: | ||
|
||
- repo: https://github.com/psf/black | ||
rev: stable | ||
- repo: https://github.com/psf/black | ||
rev: 22.1.0 | ||
hooks: | ||
- id: black | ||
- id: black | ||
args: [--safe, --quiet] | ||
language_version: python3 | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.7.7 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
|
||
- repo: https://gitlab.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
- id: flake8 | ||
exclude: docs | ||
language_version: python3 |
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 |
---|---|---|
@@ -1 +1 @@ | ||
_build | ||
_build |
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
Oops, something went wrong.