Skip to content

Commit 21ed6ac

Browse files
committed
Chore: Switch to Hatch
1 parent b9b32e5 commit 21ed6ac

File tree

8 files changed

+155
-798
lines changed

8 files changed

+155
-798
lines changed

.github/workflows/nightly.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
1-
name: publish
1+
name: Publish
22

33
on:
44
push:
55
tags:
6-
- v*
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
78

89
jobs:
910
publish:
11+
if: github.repository == 'pytest-dev/pytest-base-url'
1012
runs-on: ubuntu-latest
1113
steps:
1214
- uses: actions/checkout@v3
13-
- name: Set up Python
14-
uses: actions/setup-python@v3
1515
with:
16-
python-version: "3.9"
17-
- name: Install poetry
18-
run: curl -sSL https://install.python-poetry.org | python3 -
19-
- name: Configure poetry
20-
run: poetry config virtualenvs.in-project true
21-
- name: Set up cache
22-
uses: actions/cache@v3
16+
fetch-depth: 0
17+
persist-credentials: false
18+
19+
- name: Build and Check Package
20+
uses: hynek/build-and-inspect-python-package@v1
21+
22+
- name: Download Package
23+
uses: actions/download-artifact@v3
24+
with:
25+
name: Packages
26+
path: dist
27+
28+
- name: Publish package to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1
2330
with:
24-
path: .venv
25-
key: venv-${{ hashFiles('**/poetry.lock') }}
26-
restore-keys: venv-
27-
- name: Install Dependencies
28-
run: poetry install
29-
- name: Publish
30-
run: >-
31-
poetry publish
32-
--build
33-
--username __token__
34-
--password ${{ secrets.PYPI_TOKEN }}
31+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,58 @@
1-
name: test
1+
name: Tests
22

33
on:
44
push:
55
branches:
66
- master
7-
tags-ignore:
8-
- v*
7+
8+
schedule:
9+
- cron: '0 15 * * *' # Run daily at 14:00 UTC
10+
911
pull_request:
10-
workflow_call:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: ${{ ! contains(github.ref, github.event.repository.default_branch) }}
1116

1217
jobs:
1318
test:
14-
runs-on: ${{ matrix.os }}
19+
name: ${{ matrix.python-version }}
20+
runs-on: ubuntu-latest
1521
strategy:
1622
fail-fast: false
1723
matrix:
18-
python: ["3.7", "3.8", "3.9", "3.10", "pypy-3.8"]
19-
os: [ubuntu-latest, windows-latest]
24+
python-version: ["3.7", "3.8", "3.9", "3.10"]
2025
include:
21-
- python: "3.7"
22-
tox_env: "py37"
23-
- python: "3.8"
24-
tox_env: "py38"
25-
- python: "3.9"
26-
tox_env: "py39"
27-
- python: "3.10"
28-
tox_env: "py310"
29-
- python: "pypy-3.8"
30-
tox_env: "pypy3"
26+
- python-version: pypy3.9
27+
tox-env: py3.9
28+
- python-version: 3.11-dev
29+
tox-env: devel
30+
3131
steps:
32-
- uses: actions/checkout@v3
33-
- name: Set up Python
34-
uses: actions/setup-python@v3
35-
with:
36-
python-version: ${{ matrix.python }}
37-
- name: Install tox
38-
run: |
39-
python -m pip install --upgrade pip
40-
pip install tox
41-
- name: Cache tox environments
42-
uses: actions/cache@v3
43-
with:
44-
path: .tox
45-
key: tox-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}
46-
- name: Test
47-
run: tox -e ${{ matrix.tox_env }}
32+
- uses: actions/checkout@v3
33+
34+
- name: Set up python
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
39+
- name: Install tox
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install tox
43+
44+
- name: Cache tox environments
45+
uses: actions/cache@v3
46+
with:
47+
path: .tox
48+
key: tox-ubuntu-latest-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
49+
restore-keys: |
50+
tox-ubuntu-latest-${{ matrix.python-version }}-
51+
52+
- name: Run tests
53+
if: ${{ ! matrix.tox-env }}
54+
run: tox -e py${{ matrix.python-version }}
55+
56+
- name: Run tests
57+
if: ${{ matrix.tox-env }}
58+
run: tox -e ${{ matrix.tox-env }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
__pycache__
2+
__version.py
23
*.egg-info/
34
*.pyc
45
.cache

0 commit comments

Comments
 (0)