Skip to content

Commit

Permalink
Albrja/Mic-5267/build-from-vbu (#117)
Browse files Browse the repository at this point in the history
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
albrja authored Oct 28, 2024
1 parent c18d9d1 commit cb4df32
Showing 1 changed file with 10 additions and 61 deletions.
71 changes: 10 additions & 61 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit cb4df32

Please sign in to comment.