Skip to content

Commit 312f892

Browse files
Merge pull request #24 from pytest-dev/python-newer
expand python matrix
2 parents c233fcb + e463858 commit 312f892

File tree

3 files changed

+83
-80
lines changed

3 files changed

+83
-80
lines changed

.github/workflows/deploy.yaml

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

.github/workflows/pythonapp.yml

Lines changed: 73 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,52 @@
1-
name: Python application
1+
name: "python tests+artifacts+release"
22

33
on:
44
pull_request:
55
push:
6-
branches: [main]
6+
branches:
7+
- main
8+
tags:
9+
- "v*"
10+
release:
11+
types: [published]
12+
713

814
jobs:
15+
dist:
16+
runs-on: ubuntu-latest
17+
name: Python sdist/wheel
18+
steps:
19+
- uses: actions/checkout@v1
20+
- uses: actions/setup-python@v2
21+
with:
22+
python-version: "3.9"
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install --upgrade wheel setuptools build
27+
28+
- name: Build package
29+
run: python -m build -o dist/
30+
- uses: actions/upload-artifact@v2
31+
with:
32+
name: dist
33+
path: dist
34+
935
test:
1036
runs-on: ubuntu-latest
37+
needs: [dist]
1138
strategy:
1239
matrix:
1340
# todo: extract from source
14-
python-version: [2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9]
15-
install-style: [full, editable]
16-
41+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, "3.10-dev"]
42+
install-from: ["dist/*.whl"]
43+
include:
44+
- python-version: 3.9
45+
install-from: "-e ."
46+
- python-version: 3.9
47+
install-from: "."
48+
- python-version: 3.9
49+
install-from: "dist/*.tar.gz"
1750
steps:
1851
- uses: actions/checkout@v1
1952
- name: Set up Python ${{ matrix.python-version }}
@@ -25,14 +58,41 @@ jobs:
2558
python -m pip install --upgrade pip
2659
pip install -U setuptools setuptools_scm
2760
pip install pytest
28-
61+
- uses: actions/download-artifact@v2
62+
with:
63+
name: dist
64+
path: dist
2965
- name: install editable
30-
run: pip install -e .
31-
if: matrix.install-style=='editable'
32-
- name: install full
33-
run: pip install .
34-
35-
if: matrix.install-style=='full'
36-
66+
run: pip install ${{ matrix.install-from }}
3767
- name: pytest
3868
run: pytest
69+
70+
71+
dist_check:
72+
runs-on: ubuntu-latest
73+
needs: [dist]
74+
steps:
75+
- uses: actions/setup-python@v2
76+
with:
77+
python-version: "3.9"
78+
- uses: actions/download-artifact@v2
79+
with:
80+
name: dist
81+
path: dist
82+
- run: pipx run twine check --strict dist/*
83+
84+
dist_upload:
85+
86+
runs-on: ubuntu-latest
87+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
88+
needs: [dist_check, test]
89+
steps:
90+
- uses: actions/download-artifact@v2
91+
with:
92+
name: dist
93+
path: dist
94+
- name: Publish package to PyPI
95+
uses: pypa/gh-action-pypi-publish@master
96+
with:
97+
user: __token__
98+
password: ${{ secrets.pypi_token }}

README.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Welcome to apipkg!
2-
------------------------
1+
Welcome to apipkg !
2+
-------------------
33

44
With apipkg you can control the exported namespace of a Python package and
55
greatly reduce the number of imports for your users.
@@ -17,6 +17,7 @@ Tutorial example
1717
Here is a simple ``mypkg`` package that specifies one namespace
1818
and exports two objects imported from different modules::
1919

20+
2021
# mypkg/__init__.py
2122
import apipkg
2223
apipkg.initpkg(__name__, {
@@ -76,11 +77,11 @@ Feedback?
7677

7778
If you have questions you are welcome to
7879

79-
* join the #pytest channel `on irc.libera.chat
80-
<ircs://irc.libera.chat:6697/#pytest>`_ (using an IRC client, `via webchat
81-
<https://web.libera.chat/#pytest>`_, or `via Matrix
82-
<https://matrix.to/#/%23pytest:libera.chat>`_).
83-
* create an issue on https://github.com/pytest-dev/apipkg/issues
80+
* join the **#pytest** channel on irc.libera.chat_
81+
(using an IRC client, via webchat_, or via Matrix_).
82+
* create an issue on the bugtracker_
8483

85-
have fun,
86-
holger krekel
84+
.. _irc.libera.chat: ircs://irc.libera.chat:6697/#pytest
85+
.. _webchat: https://web.libera.chat/#pytest
86+
.. _matrix: https://matrix.to/#/%23pytest:libera.chat
87+
.. _bugtracker: https://github.com/pytest-dev/apipkg/issues

0 commit comments

Comments
 (0)