forked from isagalaev/ijson
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new job to quickly build and run tests
The wheel-building job is too time consuming and therefore doesn't work optimally to give good feedback. Moreover, it (currently) doesn't properly test the compiled extension. This new workflow define jobs for common platforms and python versions to build and test our package. These jobs run all in parallel, with each one being fairly small, and therefore should give us quick feedback after a commit is pushed. Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build and test ijson | ||
|
||
# Build on every branch push, tag push, and pull request change: | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
fast_tests: | ||
name: Build ijson and run unit tests (${{ matrix.os }}, ${{ matrix.python_version }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, windows-2019, macos-12] | ||
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- uses: actions/setup-python@v4 | ||
name: Install Python | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
|
||
- name: Install build test dependencies | ||
run: pip install setuptools | ||
|
||
- name: Install Yajl | ||
run: sudo sh .github/tools/install_yajl.sh | ||
|
||
- name: Build ijson | ||
env: | ||
IJSON_EMBED_YAJL: ${{ matrix.os != 'ubuntu-20.04' && '1' || '0' }} | ||
run: python setup.py develop | ||
|
||
- name: Install test dependencies | ||
run: pip install pytest cffi | ||
|
||
- name: Run tests | ||
run: pytest -vv |