-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Albrja/Mic-5267/build-from-vbu (#117)
Albrja/Mic-5267/build-from-vbu Build from reusable workflow - *Category*: CI - *JIRA issue*: https://jira.ihme.washington.edu/browse/MIC-5267 ### Changes and notes <!-- Change description – why, what, anything unexplained by the above. Include guidance to reviewers if changes are complex. --> ### Testing <!-- Details on how code was verified, any unit tests local for the repo, regression testing, etc. At a minimum, this should include an integration test for a framework change. Consider: plots, images, (small) csv file. -->
- Loading branch information
Showing
1 changed file
with
10 additions
and
61 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 |
---|---|---|
|
@@ -7,66 +7,15 @@ on: | |
push: | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
schedule: | ||
- cron: "0 8 * * *" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Print environment values | ||
run: | | ||
python --version | ||
cat $GITHUB_ENV | ||
- name: Update pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Install dependencies | ||
run: | | ||
pip install .[test,docs] | ||
- name: Lint | ||
run: | | ||
pip install black==22.3.0 isort | ||
black . --check --diff | ||
isort . --check --verbose --only-modified --diff | ||
- name: Test | ||
run: | | ||
if "${{ github.event_name == 'schedule' }}"; then | ||
pytest --runslow ./tests | ||
else | ||
pytest ./tests | ||
fi | ||
- name: Doc build | ||
run: | | ||
make html -C docs/ SPHINXOPTS="-W --keep-going -n" | ||
- name: Doctest | ||
run: | | ||
make doctest -C docs/ | ||
- name: Send mail | ||
# Notify when cron job fails | ||
if: (github.event_name == 'schedule' && failure()) | ||
uses: dawidd6/action-send-mail@v2 | ||
with: | ||
# mail server settings | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
# user credentials | ||
username: ${{ secrets.NOTIFY_EMAIL }} | ||
password: ${{ secrets.NOTIFY_PASSWORD }} | ||
# email subject | ||
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }} | ||
# email body as text | ||
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }} | ||
# comma-separated string, send email to | ||
to: [email protected] | ||
# from email name | ||
from: Vivarium Notifications | ||
|
||
call_build: | ||
uses: | ||
ihmeuw/vivarium_build_utils/.github/workflows/build.yml@main | ||
with: | ||
# FIXME: We can't clone gbd access but the install branch script should handle that | ||
dependencies: "vivarium_gbd_access" | ||
use_mypy: false | ||
install_type: "test,docs" |