Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to regularly test PyPI install #1406

Merged
merged 2 commits into from
Jan 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/test-from-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test installation from PyPI

on:
schedule:
# Run at 03:27 UTC on the 8th and 22nd of every month
- cron: '27 3 8,22 * *'
Comment on lines +5 to +6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the reference is here. Nothing actionable here, just wondering.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By "reference" you mean documentation reference?

It's following the same "crontab" format as standard Unix cron. Main docs are here. More here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. I mean't why at 03:27 UTC on the 8th and 22nd?

Copy link
Member Author

@mdickinson mdickinson Jan 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right. No particular reference. I just wanted a time that was outside normal working hours for both UK and US, and didn't match times that might be used in other cron jobs. The 8th (gah; sorry; the 22nd) was chosen so that this workflow first runs on the day after the 6.2.0 release, while I might still remember to check it.


jobs:
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: Install Linux packages for Qt 5 support
run: |
sudo apt-get update
sudo apt-get install qt5-default
sudo apt-get install libxkbcommon-x11-0
sudo apt-get install libxcb-icccm4
sudo apt-get install libxcb-image0
sudo apt-get install libxcb-keysyms1
sudo apt-get install libxcb-randr0
sudo apt-get install libxcb-render-util0
sudo apt-get install libxcb-xinerama0
if: runner.os == 'Linux'
- 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 wheel
- name: Install Traits and test dependencies from PyPI sdist
run: |
python -m pip install --no-binary traits traits[test]
- name: Create clean test directory
run: |
mkdir testdir
- name: Test Traits package
uses: GabrielBB/xvfb-action@v1
with:
working-directory: testdir
run: python -m unittest discover -v traits