Skip to content

Commit

Permalink
Full in pyproject.toml and Poetry (#289)
Browse files Browse the repository at this point in the history
* Full in pyproject.toml and Poetry

* skip cache for 3.6 on win
  • Loading branch information
BeyondEvil committed Mar 28, 2022
1 parent 2e27988 commit 7371e52
Show file tree
Hide file tree
Showing 39 changed files with 407 additions and 536 deletions.
110 changes: 0 additions & 110 deletions .github/workflows/main.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/nightly.yml
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
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
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 }}
100 changes: 100 additions & 0 deletions .github/workflows/test.yml
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"
19 changes: 12 additions & 7 deletions .pre-commit-config.yaml
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
17 changes: 0 additions & 17 deletions Pipfile

This file was deleted.

2 changes: 1 addition & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
_build
_build
14 changes: 7 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
master_doc = "index"

# General information about the project.
project = u"pytest-selenium"
copyright = u"2019, Dave Hunt"
author = u"Dave Hunt, Jim Brännlund"
project = "pytest-selenium"
copyright = "2019, Dave Hunt"
author = "Dave Hunt, Jim Brännlund"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -222,8 +222,8 @@
(
master_doc,
"pytest-selenium.tex",
u"pytest-selenium Documentation",
u"Dave Hunt",
"pytest-selenium Documentation",
"Dave Hunt",
"manual",
)
]
Expand Down Expand Up @@ -254,7 +254,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, "pytest-selenium", u"pytest-selenium Documentation", [author], 1)
(master_doc, "pytest-selenium", "pytest-selenium Documentation", [author], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -270,7 +270,7 @@
(
master_doc,
"pytest-selenium",
u"pytest-selenium Documentation",
"pytest-selenium Documentation",
author,
"pytest-selenium",
"One line description of project.",
Expand Down
2 changes: 1 addition & 1 deletion docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Release Notes
2.0.1 (2020-09-19)
------------------

* Allow ``xdist`` worker nodes to configure sensitive url
* Allow ``xdist`` worker nodes to configure sensitive url

* Thanks to `@charith-kulathilaka <https://github.com/charith-kulathilaka>`_ for reporting the issue.

Expand Down

0 comments on commit 7371e52

Please sign in to comment.