deps: bump the prod-deps group across 1 directory with 4 updates (#28) #47
This file contains hidden or 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: | |
push: | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
python-version: "3.9" | |
- os: ubuntu-latest | |
python-version: "3.12" | |
- os: windows-latest | |
python-version: "3.12" | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash # for windows and linux | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
# Add Poetry to PATH for Windows runners (Bash shell) | |
if [[ "$RUNNER_OS" == "Windows" ]]; then | |
export PATH="$HOME/.local/bin:/c/Users/runneradmin/AppData/Roaming/Python/Scripts:$PATH" | |
fi | |
# create a .venv folder in the working directory | |
poetry config virtualenvs.in-project true | |
poetry config virtualenvs.create true | |
# ensure poetry is installed by checking the version | |
poetry --version | |
- name: Install dependencies | |
run: | | |
if [[ "$RUNNER_OS" == "Windows" ]]; then | |
export PATH="$HOME/.local/bin:/c/Users/runneradmin/AppData/Roaming/Python/Scripts:$PATH" | |
fi | |
python -m pip install --upgrade pip | |
poetry install | |
- name: Run pre-commit | |
run: | | |
if [[ "$RUNNER_OS" == "Windows" ]]; then | |
export PATH="$HOME/.local/bin:/c/Users/runneradmin/AppData/Roaming/Python/Scripts:$PATH" | |
fi | |
poetry run pre-commit run --all-files | |
# Running notebook will download the comstock data and run | |
# the entire notebook. It will take ~10 minutes to run on CI because | |
# the data are downloaded every time. | |
- name: Run notebook and check for completion | |
env: | |
TEST_DATA: "true" | |
run: | | |
if [[ "$RUNNER_OS" == "Windows" ]]; then | |
export PATH="$HOME/.local/bin:/c/Users/runneradmin/AppData/Roaming/Python/Scripts:$PATH" | |
fi | |
poetry run python comstock_processor.py | |
poetry run jupyter nbconvert --to html --execute analysis.ipynb --output test_output-${{ github.run_id }}.html | |
- name: Upload HTML Artifact | |
if: ${{ matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: notebook-html-${{ github.run_id }} | |
path: test_output-${{ github.run_id }}.html |