Skip to content

Commit

Permalink
update action.yml, static_type_checks.yml and Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBernstorff committed Aug 30, 2024
1 parent 02fc722 commit 8ad9ef7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
19 changes: 9 additions & 10 deletions .github/actions/test_tutorials/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,26 @@ runs:
using: "composite"
steps:
### Setup prerequisites
- name: Set up uv
shell: bash
# Install a specific uv version using the installer
run: curl -LsSf https://astral.sh/uv/0.4.0/install.sh | sh

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
shell: bash
run: uv python install

# Installing
- name: Install dependencies
shell: bash
run: |
pip install invoke
inv install
make install
### Run tests
- name: Install jupyter
shell: bash
run: |
pip install jupyter
- name: Compile notebooks and check for errors
shell: bash
run: |
inv test-tutorials
make test-tutorials
for notebook in tutorials/*.ipynb; do
if grep -q "\"cell_type\": \"error\"" $notebook; then
echo "Error cell found in $notebook"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/static_type_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ jobs:
uses: actions/checkout@v4

- name: Create github hosts file
run: | # If this file is not created, the dev container fails because of non-existent mount
run:
| # If this file is not created, the dev container fails because of non-existent mount
mkdir -p ~/.config/gh
touch ~/.config/gh/hosts.yml

- name: Pre-build dev container image
uses: devcontainers/[email protected]
with:
runCmd: |
inv types
make types
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ test-tutorials:
types:
uv run pyright src

install:
uv sync --all-extras

lint:
uv run pre-commit run --all-files

Expand Down

0 comments on commit 8ad9ef7

Please sign in to comment.