|
7 | 7 | push: |
8 | 8 | pull_request: |
9 | 9 | workflow_dispatch: |
10 | | - schedule: |
| 10 | + schedule: |
11 | 11 | - cron: "0 8 * * *" |
12 | | - |
| 12 | + |
13 | 13 | jobs: |
14 | 14 | build: |
15 | | - runs-on: ubuntu-latest |
16 | 15 | strategy: |
17 | 16 | matrix: |
18 | 17 | python-version: ["3.10", "3.11"] |
19 | | - steps: |
20 | | - - uses: actions/checkout@v3 |
21 | | - - name: Set up Python ${{ matrix.python-version }} |
22 | | - uses: actions/setup-python@v4 |
23 | | - with: |
24 | | - python-version: ${{ matrix.python-version }} |
25 | | - - name: Print environment values |
26 | | - run: | |
27 | | - python --version |
28 | | - cat $GITHUB_ENV |
29 | | - - name: Update pip |
30 | | - run: | |
31 | | - python -m pip install --upgrade pip |
32 | | - - name: Install dependencies |
33 | | - run: | |
34 | | - pip install .[dev] |
35 | | - - name: Lint |
36 | | - run: | |
37 | | - pip install black==22.3.0 isort |
38 | | - black . --check --diff |
39 | | - isort . --check --verbose --only-modified --diff |
40 | | - - name: Test |
41 | | - run: | |
42 | | - if "${{ github.event_name == 'schedule' }}"; then |
43 | | - pytest --runslow ./tests |
44 | | - else |
45 | | - pytest --limit=1 ./tests |
46 | | - fi |
47 | | - - name: Doc build |
48 | | - run: | |
49 | | - make html -C docs/ SPHINXOPTS="-W --keep-going -n" |
50 | | - - name: Doctest |
51 | | - run: | |
52 | | - make doctest -C docs/ |
53 | | - - name: Send mail |
54 | | - # Notify when cron job fails |
55 | | - if: (github.event_name == 'schedule' && failure()) |
56 | | - uses: dawidd6/action-send-mail@v2 |
57 | | - with: |
58 | | - # mail server settings |
59 | | - server_address: smtp.gmail.com |
60 | | - server_port: 465 |
61 | | - # user credentials |
62 | | - username: ${{ secrets.NOTIFY_EMAIL }} |
63 | | - password: ${{ secrets.NOTIFY_PASSWORD }} |
64 | | - # email subject |
65 | | - subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }} |
66 | | - # email body as text |
67 | | - body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }} |
68 | | - # comma-separated string, send email to |
69 | | - to: uw_ihme_simulationscience@uw.edu |
70 | | - # from email name |
71 | | - from: Pseudopeople Notifications |
| 18 | + uses: |
| 19 | + ihmeuw/vivarium_build_utils/.github/workflows/build.yml@main |
| 20 | + with: |
| 21 | + dependencies: "layered_config_tree" |
| 22 | + python_version: ${{ matrix.python-version }} |
| 23 | + skip_mypy: true |
| 24 | + secrets: |
| 25 | + notify_email: ${{ secrets.NOTIFY_EMAIL }} |
| 26 | + NOTIFY_PASSWORD: ${{ secrets.NOTIFY_PASSWORD }} |
| 27 | + |
0 commit comments