Skip to content

Commit 9a7e490

Browse files
committed
Separation of workflows to target a given directory.
1 parent 4f03108 commit 9a7e490

File tree

4 files changed

+311
-227
lines changed

4 files changed

+311
-227
lines changed

.github/workflows/run_notebooks.yml

Lines changed: 0 additions & 227 deletions
This file was deleted.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Run Misc Notebooks CI
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
paths:
7+
- 'addendum/parquet_convert/**'
8+
pull_request:
9+
branches: [ '*' ]
10+
paths:
11+
- 'addendum/parquet_convert/**'
12+
13+
jobs:
14+
dump_contexts_to_log:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Dump GitHub context
18+
env:
19+
GITHUB_CONTEXT: ${{ toJson(github) }}
20+
run: echo "$GITHUB_CONTEXT"
21+
- name: Dump job context
22+
env:
23+
JOB_CONTEXT: ${{ toJson(job) }}
24+
run: echo "$JOB_CONTEXT"
25+
- name: Dump steps context
26+
env:
27+
STEPS_CONTEXT: ${{ toJson(steps) }}
28+
run: echo "$STEPS_CONTEXT"
29+
- name: Dump runner context
30+
env:
31+
RUNNER_CONTEXT: ${{ toJson(runner) }}
32+
run: echo "$RUNNER_CONTEXT"
33+
- name: Dump strategy context
34+
env:
35+
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
36+
run: echo "$STRATEGY_CONTEXT"
37+
- name: Dump matrix context
38+
env:
39+
MATRIX_CONTEXT: ${{ toJson(matrix) }}
40+
run: echo "$MATRIX_CONTEXT"
41+
42+
build-misc-notebooks:
43+
runs-on: ubuntu-latest
44+
strategy:
45+
matrix:
46+
python: ["3.10", "3.11", "3.12"]
47+
48+
steps:
49+
50+
- name: Checkout the repo.
51+
uses: actions/checkout@v4
52+
53+
# Cambiado addendum/parquet_convert/csv_to_parquet.ipynb?
54+
- name: addendum/parquet_convert/csv_to_parquet.ipynb changed?
55+
id: changed-file-csv-parquet
56+
uses: tj-actions/changed-files@v42
57+
with:
58+
files: |
59+
addendum/parquet_convert/csv_to_parquet.ipynb
60+
61+
- name: Setup Python
62+
uses: actions/setup-python@v5
63+
if: steps.changed-file-csv-parquet.outputs.any_changed == 'true'
64+
with:
65+
python-version: '${{ matrix.python }}'
66+
cache: 'pip'
67+
68+
- name: Install dependencies
69+
if: steps.changed-file-csv-parquet.outputs.any_changed == 'true'
70+
run: |
71+
python3 -m pip install --upgrade pip
72+
pip install -r .github/workflows/requirements.txt
73+
74+
- uses: dsevilla/run-notebook@v2
75+
if: steps.changed-file-csv-parquet.outputs.any_changed == 'true'
76+
env:
77+
RUNNER: ${{ toJson(runner) }}
78+
SECRETS: ${{ toJson(secrets) }}
79+
GITHUB: ${{ toJson(github) }}
80+
with:
81+
notebook: "addendum/parquet_convert/csv_to_parquet.ipynb"
82+
isReport: False
83+
poll: True
84+
85+
- uses: actions/upload-artifact@v4
86+
if: steps.changed-file-csv-parquet.outputs.any_changed == 'true'
87+
with:
88+
name: output-misc-${{ matrix.python }}
89+
path: ${{ RUNNER.temp }}/nb-runner
90+
env:
91+
RUNNER: ${{ toJson(runner) }}

0 commit comments

Comments
 (0)