Skip to content

Python package run by Cron #1046

Python package run by Cron

Python package run by Cron #1046

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package run by Cron
on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: "30 1 * * *"
env:
TF_KERAS_VIS_MAX_STEPS: 3
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.9, '3.10', '3.11', '3.12']
tensorflow: [current, pre, nightly]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install current Tensorflow
if: matrix.tensorflow == 'current'
run: |
python -m pip install --upgrade tensorflow
- name: Install pre-released Tensorflow
if: matrix.tensorflow == 'pre'
run: |
python -m pip install --upgrade --pre tensorflow
- name: Install pre-released Tensorflow
if: matrix.tensorflow == 'nightly'
run: |
python -m pip install --upgrade tf-nightly
- name: Install dependencies
run: |
python -m pip install --upgrade -e .[develop,examples]
- name: Test with pytest
run: |
pytest -n auto --dist loadscope
timeout-minutes: 60
- name: Test attentions.ipynb
run: |
jupyter-nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute examples/attentions.ipynb
- name: Test visualize_dense_layer.ipynb
run: |
jupyter-nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute examples/visualize_dense_layer.ipynb
- name: Test visualize_conv_filters.ipynb
run: |
jupyter-nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute examples/visualize_conv_filters.ipynb