-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to test PyPI wheels (#23)
* Add workflow to test PyPI packages * Fix yaml syntax; only install wheels * Fix syntax for binary-only pip install * Add test for sdist * Better job names * Fix syntax - remove unnecessary 'jobs' * Change job trigger to a twice-monthly schedule
- Loading branch information
1 parent
6c3f68d
commit 87b255b
Showing
1 changed file
with
73 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Test installation from PyPI | ||
|
||
on: | ||
schedule: | ||
# Run at 02:37 UTC on the 11th and 25th of every month | ||
- cron: '37 2 11,25 * *' | ||
|
||
jobs: | ||
test-pypi-wheel: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
python-architecture: [x86, x64] | ||
exclude: | ||
- os: macos-latest | ||
python-architecture: x86 | ||
- os: ubuntu-latest | ||
python-architecture: x86 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} (${{ matrix.python-architecture }}) | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: ${{ matrix.python-architecture }} | ||
- name: Install prerequisites | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install wheel | ||
- name: Install wheel from PyPI | ||
run: | | ||
python -m pip install --only-binary :all: ibm2ieee | ||
- name: Run tests in a clean directory | ||
run: | | ||
mkdir testdir | ||
cd testdir | ||
python -m unittest discover -v ibm2ieee | ||
test-pypi-sdist: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
python-architecture: [x86, x64] | ||
exclude: | ||
- os: macos-latest | ||
python-architecture: x86 | ||
- os: ubuntu-latest | ||
python-architecture: x86 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} (${{ matrix.python-architecture }}) | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: ${{ matrix.python-architecture }} | ||
- name: Install prerequisites | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install wheel | ||
- name: Install from PyPI sdist | ||
run: | | ||
python -m pip install --no-binary ibm2ieee ibm2ieee | ||
- name: Run tests in a clean directory | ||
run: | | ||
mkdir testdir | ||
cd testdir | ||
python -m unittest discover -v ibm2ieee |