Skip to content

Commit

Permalink
Add cron job for testing installation (#389)
Browse files Browse the repository at this point in the history
## Description

<!-- Provide a brief description of the PR's purpose here. -->

To increase confidence in our installation process, this PR adds a job
that installs pyribs from PyPI on a daily basis. The time chosen is
19:00 UTC, which is 11AM PST or 12PM PDT (daylight savings time dictates
which one applies).

This job can also be triggered by pushing to the `schedule-install`
branch.

## TODO

<!-- Notable points that this PR has either accomplished or will
accomplish. -->

- [x] Test job

## Questions

<!-- Any concerns or points of confusion? -->

## Status

- [x] I have read the guidelines in

[CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md)
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [x] I have added a one-line description of my change to the changelog
in
      `HISTORY.md`
- [x] This PR is ready to go
  • Loading branch information
btjanaka authored Oct 4, 2023
1 parent 00b5e3f commit 8216e09
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Test installation from vendors like PyPI and Conda.
name: Install

on:
schedule:
# Every day at 7PM UTC (11AM PST, 12PM PDT).
- cron: "0 19 * * *"
push:
# Push to the schedule-install branch to test this cron job.
branches:
- schedule-install

defaults:
run:
# The default shell must be set like this so that bash will source the
# profile, which contains settings initialized by Conda:
# https://github.com/marketplace/actions/setup-miniconda#important
shell: bash -el {0}

jobs:
test:
strategy:
max-parallel: 12 # All in parallel.
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11"]
command:
["pip install ribs[all]", "conda install -c conda-forge pyribs-all"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install pyribs
run: ${{ matrix.command }}
- name: Try importing ribs
run: |
python -c "import ribs; import ribs.visualize; print(ribs.__version__)"
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#### Improvements

- Test pyribs installation in tutorials ({pr}`384`)
- Add cron job for testing installation ({pr}`389`)

## 0.6.3

Expand Down

0 comments on commit 8216e09

Please sign in to comment.