Skip to content

Commit 4860639

Browse files
authored
Merge pull request #301 from python-jsonschema/support-testing-from-sdist
Support testing from sdist
2 parents 144a5c9 + 6a13b1a commit 4860639

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/workflows/build.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,28 @@ jobs:
3636

3737
- run: python -m tox run -e "${{ matrix.toxenv }}"
3838

39+
# run tests after building an sdist and unpacking it
40+
test-sdist:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v3
44+
- uses: actions/setup-python@v4
45+
with:
46+
python-version: "3.x"
47+
- name: install requirements
48+
run: python -m pip install build tox
49+
- name: build and unpack sdist
50+
run: |
51+
python -m build --sdist
52+
version="$(grep '^version' setup.cfg | cut -d '=' -f2 | tr -d ' ')"
53+
cd dist
54+
tar -xzf "check-jsonschema-${version}.tar.gz"
55+
- name: test
56+
run: |
57+
version="$(grep '^version' setup.cfg | cut -d '=' -f2 | tr -d ' ')"
58+
cd "dist/check-jsonschema-${version}"
59+
python -m tox run -m ci
60+
3961
ci-test-matrix:
4062
strategy:
4163
matrix:

MANIFEST.in

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
1+
## Core Package Requirements
2+
3+
# data files in the distribution
14
include src/check_jsonschema/builtin_schemas/vendor/*
25
include src/check_jsonschema/builtin_schemas/custom/*.json
6+
7+
## Testing Requirements
8+
9+
# include all test files and test data files
10+
recursive-include tests *.py *.json *.yaml *.yml *.json5 *.toml
11+
12+
# the test runner
13+
include tox.ini
14+
15+
# needed as a data file for the tests (several tests check integrity
16+
# against this file)
17+
include .pre-commit-hooks.yaml

0 commit comments

Comments
 (0)