Test with previous scripts. #42
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: Run Mongo Notebooks CI | |
on: | |
push: | |
branches: [ '*' ] | |
paths: | |
- 'mongo/**' | |
pull_request: | |
branches: [ '*' ] | |
paths: | |
- 'mongo/**' | |
jobs: | |
dump_contexts_to_log: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Dump job context | |
env: | |
JOB_CONTEXT: ${{ toJson(job) }} | |
run: echo "$JOB_CONTEXT" | |
- name: Dump steps context | |
env: | |
STEPS_CONTEXT: ${{ toJson(steps) }} | |
run: echo "$STEPS_CONTEXT" | |
- name: Dump runner context | |
env: | |
RUNNER_CONTEXT: ${{ toJson(runner) }} | |
run: echo "$RUNNER_CONTEXT" | |
- name: Dump strategy context | |
env: | |
STRATEGY_CONTEXT: ${{ toJson(strategy) }} | |
run: echo "$STRATEGY_CONTEXT" | |
- name: Dump matrix context | |
env: | |
MATRIX_CONTEXT: ${{ toJson(matrix) }} | |
run: echo "$MATRIX_CONTEXT" | |
setup-modified-files: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo. | |
uses: actions/checkout@v4 | |
- name: Get all changed files. | |
id: changed-notebooks | |
uses: tj-actions/changed-files@v46 | |
with: | |
matrix: true | |
files: mongo/sesion*.ipynb | |
- name: Show all changed files | |
run: echo "${{ steps.changed-notebooks.outputs.all_changed_files }}" | |
outputs: | |
notebooks-any_changed: ${{ steps.changed-notebooks.outputs.any_changed }} | |
notebooks-changed: ${{ steps.changed-notebooks.outputs.all_changed_files }} | |
build-mongo-notebooks: | |
uses: ./.github/workflows/run_notebooks.yml | |
needs: setup-modified-files | |
if: needs.setup-modified-files.outputs.notebooks-any_changed == 'true' | |
with: | |
service: true | |
docker-run-line: -p27017:27017 --health-cmd="echo 'db.runCommand(\"ping\").ok' | mongosh --quiet" --health-interval=10s --health-timeout=5s --health-retries=3 mongo:6 | |
python-versions: '["3.10", "3.12", "3.13"]' | |
notebooks: ${{ needs.setup-modified-files.outputs.notebooks-changed }} | |
environment: "DB_HOSTNAME=\"127.0.0.1\"" |