Skip to content

[FIX] mv docs-scripts to action_files #255

[FIX] mv docs-scripts to action_files

[FIX] mv docs-scripts to action_files #255

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
defaults:
run:
shell: bash -l {0}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
nb-sync:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
- name: Install nbdev
run: pip install nbdev
- name: Check if all notebooks are cleaned
run: |
echo "Check we are starting with clean git checkout"
if [ -n "$(git status -uno -s)" ]; then echo "git status is not clean"; false; fi
echo "Trying to strip out notebooks"
nbdev_clean
echo "Check that strip out was unnecessary"
git status -s # display the status to see which nbs need cleaning up
if [ -n "$(git status -uno -s)" ]; then echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_git_hooks"; false; fi
run-all-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.9, '3.10']
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
create-args: python=${{ matrix.python-version }}
cache-environment: true
- name: Install pip requirements
run: pip install ./
- name: Run tests
env:
TIMEGPT_TOKEN: ${{ secrets.TIMEGPT_TOKEN }}
TIMEGPT_API_URL: ${{ secrets.TIMEGPT_API_URL }}
TIMEGPT_CUSTOM_URL_TOKEN: ${{ secrets.TIMEGPT_CUSTOM_URL_TOKEN }}
TIMEGPT_CUSTOM_URL: ${{ secrets.TIMEGPT_CUSTOM_URL }}
API_KEY_FRED: ${{ secrets.API_KEY_FRED }}
run: nbdev_test
run-local-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9, '3.10']
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
create-args: python=${{ matrix.python-version }}
cache-environment: true
- name: Install pip requirements
run: pip install ./
- name: Run tests
env:
TIMEGPT_TOKEN: ${{ secrets.TIMEGPT_TOKEN }}
TIMEGPT_API_URL: ${{ secrets.TIMEGPT_API_URL }}
TIMEGPT_CUSTOM_URL_TOKEN: ${{ secrets.TIMEGPT_CUSTOM_URL_TOKEN }}
TIMEGPT_CUSTOM_URL: ${{ secrets.TIMEGPT_CUSTOM_URL }}
API_KEY_FRED: ${{ secrets.API_KEY_FRED }}
run: nbdev_test --skip_file_glob "*distributed*"