This repository has been archived by the owner on May 22, 2024. It is now read-only.
build(deps): bump ipykernel from 6.23.1 to 6.28.0 in /requirements #515
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
name: CI | |
on: | |
# NOTE(robinson) - We are limiting when we run CI avoid exceeding our 2,000 min/month limt. | |
# We can switch to running on push if we make this repo public or are fine with | |
# paying for CI minutes. | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
PYTHON_VERSION: "3.8" | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
env: | |
NLTK_DATA: ${{ github.workspace }}/nltk_data | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
id: virtualenv-cache | |
with: | |
path: | | |
.venv | |
sample-docs | |
key: ci-venv-sec-${{ hashFiles('requirements/*.txt', 'sample-docs/sample-sec-docs.sha256') }} | |
- name: Set up Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Setup virtual environment (no cache hit) | |
if: steps.virtualenv-cache.outputs.cache-hit != 'true' | |
run: | | |
python${{ env.PYTHON_VERSION }} -m venv .venv | |
source .venv/bin/activate | |
make install-ci | |
make dl-test-artifacts | |
- uses: actions/cache@v3 | |
id: nltk-cache | |
with: | |
path: /home/runner/nltk_data | |
key: ci-nltk-${{ hashFiles('requirements/*.txt') }} | |
- name: Download NLTK (no cache hit) | |
if: steps.nltk-cache.outputs.cache-hit != 'true' | |
run: | | |
source .venv/bin/activate | |
make install-nltk-models | |
lint: | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
id: virtualenv-cache | |
with: | |
path: | | |
.venv | |
sample-docs | |
key: ci-venv-sec-${{ hashFiles('requirements/*.txt', 'sample-docs/sample-sec-docs.sha256') }} | |
- uses: actions/cache@v3 | |
id: nltk-cache | |
with: | |
path: /home/runner/nltk_data | |
key: ci-nltk-${{ hashFiles('requirements/*.txt') }} | |
- name: Set up Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Lint | |
run: | | |
source .venv/bin/activate | |
make check | |
make check-notebooks | |
shellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: ShellCheck | |
uses: ludeeus/action-shellcheck@master | |
test: | |
runs-on: ubuntu-latest | |
env: | |
NLTK_DATA: ${{ github.workspace }}/nltk_data | |
needs: [setup, lint] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
id: virtualenv-cache | |
with: | |
path: | | |
.venv | |
sample-docs | |
key: ci-venv-sec-${{ hashFiles('requirements/*.txt', 'sample-docs/sample-sec-docs.sha256') }} | |
- uses: actions/cache@v3 | |
id: nltk-cache | |
with: | |
path: /home/runner/nltk_data | |
key: ci-nltk-${{ hashFiles('requirements/*.txt') }} | |
- name: Run core tests | |
run: | | |
source .venv/bin/activate | |
make test | |
make check-coverage | |
- name: Run sample SEC documents tests | |
run: | | |
source .venv/bin/activate | |
make test-sample-docs | |
changelog: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- if: github.ref != 'refs/heads/main' | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
src: | |
- 'doc_recipe/**' | |
- 'recipe-notebooks/**' | |
- if: steps.changes.outputs.src == 'true' && github.ref != 'refs/heads/main' | |
uses: dangoslen/changelog-enforcer@v3 | |
api_consistency: | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
id: virtualenv-cache | |
with: | |
path: | | |
.venv | |
sample-docs | |
key: ci-venv-sec-${{ hashFiles('requirements/*.txt', 'sample-docs/sample-sec-docs.sha256') }} | |
- name: API Consistency | |
run: | | |
source .venv/bin/activate | |
make api-check |