Skip to content

Commit b564efc

Browse files
Add test utility library
1 parent f1e2f70 commit b564efc

File tree

16 files changed

+1503
-0
lines changed

16 files changed

+1503
-0
lines changed

.github/workflows/python-build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Build
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
deploy:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: [ '3.13' ]
16+
os: [ ubuntu-latest ]
17+
18+
runs-on: ${{ matrix.os }}
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
steps:
24+
- name: Clone Amulet-Test-Utils
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
32+
- name: Install dependencies
33+
run: |
34+
pip cache purge
35+
python -m pip install --upgrade pip
36+
pip install build twine
37+
38+
- name: Build Amulet-Test-Utils
39+
run: |
40+
python -m build .
41+
42+
- name: Publish Amulet-Test-Utils
43+
env:
44+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
45+
TWINE_PASSWORD: ${{ secrets.AMULET_TEST_UTILS_PYPI_PASSWORD }}
46+
run: |
47+
twine upload dist/* --skip-existing
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Unittests
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
- main
11+
- '[0-9]+.[0-9]+'
12+
- '[0-9]+.[0-9]+.[0-9]+'
13+
pull_request:
14+
15+
jobs:
16+
unittests:
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: [ '3.11', '3.12', '3.13' ]
21+
os: [ windows-latest, macos-latest, ubuntu-latest ]
22+
23+
runs-on: ${{ matrix.os }}
24+
defaults:
25+
run:
26+
shell: bash
27+
28+
steps:
29+
- name: Clone Amulet-Test-Utils
30+
uses: actions/checkout@v4
31+
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
37+
- name: Install dependencies
38+
run: |
39+
pip cache purge
40+
python -m pip install --upgrade pip
41+
pip install .[dev]
42+
python tests/compile.py
43+
44+
- name: Test with unittest
45+
run: python -m unittest discover -v -s tests

.gitignore

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.dll
8+
*.so
9+
*.dylib
10+
11+
# Distribution / packaging
12+
.Python
13+
build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
!version_definitions/*/*.manifest
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
.hypothesis/
51+
.pytest_cache/
52+
53+
# Translations
54+
*.mo
55+
*.pot
56+
57+
# Django stuff:
58+
*.log
59+
local_settings.py
60+
db.sqlite3
61+
62+
# Flask stuff:
63+
instance/
64+
.webassets-cache
65+
66+
# Scrapy stuff:
67+
.scrapy
68+
69+
# Sphinx documentation
70+
docs/_build/
71+
docs_build/
72+
73+
# PyBuilder
74+
target/
75+
76+
# Jupyter Notebook
77+
.ipynb_checkpoints
78+
79+
# pyenv
80+
.python-version
81+
82+
# celery beat schedule file
83+
celerybeat-schedule
84+
85+
# SageMath parsed files
86+
*.sage.py
87+
88+
# Environments
89+
.env
90+
.venv
91+
env/
92+
venv/
93+
venv_37/
94+
ENV/
95+
env.bak/
96+
venv.bak/
97+
venv*
98+
99+
# Spyder project settings
100+
.spyderproject
101+
.spyproject
102+
103+
# Rope project settings
104+
.ropeproject
105+
106+
# PyCharm settings
107+
.idea/
108+
109+
# mkdocs documentation
110+
/site
111+
112+
# mypy
113+
.mypy_cache/
114+
115+
temp
116+
117+
# visual studio files
118+
*.vs/
119+
*.vcxproj*
120+
*.sln
121+
*.ilk
122+
*.exp
123+
*.lib
124+
*.pdb
125+
/install

0 commit comments

Comments
 (0)