-
-
Notifications
You must be signed in to change notification settings - Fork 3
138 lines (127 loc) · 5.8 KB
/
smoke_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# This file is managed by 'repo_helper'. Don't edit it directly.
---
name: Smoke Test
on:
push:
# branches: ["master"]
permissions:
contents: read
jobs:
tests:
name: " ${{ matrix.config.repo }}"
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
config:
- repo: "sphinx-toolbox/default_values"
name: "default_values"
modname: "sphinxcontrib/default_values"
- repo: "sphinx-toolbox/dict2css"
name: "dict2css"
modname: "dict2css"
- repo: "sphinx-toolbox/extras_require"
name: "extras_require"
modname: "sphinxcontrib/extras_require"
- repo: "sphinx-toolbox/seed_intersphinx_mapping"
name: "seed_intersphinx_mapping"
modname: "seed_intersphinx_mapping"
- repo: "sphinx-toolbox/sphinx-debuginfo"
name: "sphinx-debuginfo"
modname: "sphinx_debuginfo"
- repo: "sphinx-toolbox/sphinx-highlights"
name: "sphinx-highlights"
modname: "sphinx_highlights"
- repo: "sphinx-toolbox/sphinx-toolbox"
name: "sphinx-toolbox"
modname: "sphinx_toolbox"
- repo: "sphinx-toolbox/toctree_plus"
name: "toctree_plus"
modname: "sphinxcontrib/toctree_plus"
- repo: "repo-helper/mkrecipe"
name: "mkrecipe"
modname: "mkrecipe"
# - repo: "domdfcoding/consolekit"
# name: "consolekit"
# modname: "consolekit"
# extra-install-args: "--extra-index-url https://domdfcoding.github.io/wheelhouse/"
- repo: "domdfcoding/mathematical"
name: "mathematical"
modname: "mathematical"
- repo: "python-coincidence/coincidence"
name: "coincidence"
modname: "coincidence"
- repo: "python-formate/formate"
name: "formate"
modname: "formate"
- repo: "python-formate/astatine"
name: "astatine"
modname: "astatine"
- repo: "python-formate/flake8-dunder-all"
name: "flake8-dunder-all"
modname: "flake8_dunder_all"
- repo: "python-formate/flake8-encodings"
name: "flake8-encodings"
modname: "flake8_encodings"
- repo: "python-formate/flake8-github-actions"
name: "flake8-github-actions"
modname: "flake8_github_actions"
- repo: "python-formate/flake8-helper"
name: "flake8-helper"
modname: "flake8_helper"
- repo: "python-formate/flake8-slots"
name: "flake8-slots"
modname: "flake8_slots"
- repo: "python-formate/flake8-sphinx-links"
name: "flake8-sphinx-links"
modname: "flake8_sphinx_links"
- repo: "python-formate/flake8_strftime"
name: "flake8_strftime"
modname: "flake8_strftime"
- repo: "python-formate/formate"
name: "formate"
modname: "formate"
- repo: "python-formate/snippet-fmt"
name: "snippet-fmt"
modname: "snippet_fmt"
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v3"
- name: Setup Python 🐍
uses: "actions/setup-python@v4"
with:
python-version: "3.8"
- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade "pip>=21.3" setuptools wheel virtualenv pyproject-parser[cli]
python -m pip install "check-wheel-contents>=0.1.0" "twine>=3.2.0"
python -m pip install .[editable]
- name: Clone
run: |
git clone https://github.com/${{ matrix.config.repo }} /tmp/${{ matrix.config.name }}
- name: Build
run: |
python3 -m virtualenv venv
WHEY_TRACEBACK=1
python3 -m pip install $(pyproject-parser info build-system.requires -f /tmp/${{ matrix.config.name }}/pyproject.toml | jq 'join(" ")' -r)
python3 -m pip install /tmp/${{ matrix.config.name }} --prefix venv -I --no-build-isolation
venv/bin/python -m pip install -r /tmp/${{ matrix.config.name }}/tests/requirements.txt ${{ matrix.config.extra-install-args }} || exit 1
venv/bin/python -m pip show ${{ matrix.config.name }} || exit 1
venv/bin/python -c "import importlib; file = importlib.import_module('${{ matrix.config.modname }}'.replace('/', '.')).__file__; assert file != '/tmp/${{ matrix.config.name }}/${{ matrix.config.modname }}/__init__.py', file"
venv/bin/python -m pytest /tmp/${{ matrix.config.name }}/tests || exit 1
- name: "Check wheel"
run: |
python3 -m whey
python3 -m twine check dist/*.tar.gz dist/*.whl
python3 -m check_wheel_contents dist/
working-directory: /tmp/${{ matrix.config.name }}
- name: Build Editable
run: |
python3 -m virtualenv venv-editable
venv-editable/bin/python -m pip install -r /tmp/${{ matrix.config.name }}/tests/requirements.txt ${{ matrix.config.extra-install-args }} || exit 1
python3 -m pip install --editable /tmp/${{ matrix.config.name }} --prefix venv-editable -I --no-build-isolation
venv-editable/bin/python -c "import importlib; file = importlib.import_module('${{ matrix.config.modname }}'.replace('/', '.')).__file__; assert file == '/tmp/${{ matrix.config.name }}/${{ matrix.config.modname }}/__init__.py', file"
venv-editable/bin/python -m pip show ${{ matrix.config.name }} || exit 1
venv-editable/bin/python -m pytest /tmp/${{ matrix.config.name }}/tests || exit 1