Python version error while running CI operations in github

Hi,

after pushing a commit to github, in the Run fastai/workflows/nbdev-ci@master step, I get an error

ERROR: Package 'ricardo' requires a different Python: 3.9.13 not in '>=3.10'

I guess it’s because I set up

min_python = 3.10

in settings.ini.

In nbdev1 I “fixed” this a few times by changing the python version in .github/workflows/main.yml…but that file is not there anymore in my nbdev2 repo. How can I fix this in the new nbdev?

Cheers

cc @hamelsmu, I’ll put a PR in a bit later today so the python version can be passed in as a config for the runner :slight_smile:

2 Likes

Thank you so much!!

You can do this by changing the workflow test yaml to be:

name: CI
on:  [workflow_dispatch, pull_request, push]

jobs:
  test:
    runs-on: ubuntu-latest
    steps: [uses: fastai/workflows/nbdev-ci@master]
    with:
        version: '3.10'
1 Like

It’s working :smile:

Thanks!!

2 Likes

Sorry to be nagging again…

I just realized that, even though I can see the :heavy_check_mark: in the commit, I get a Run failed at startup: CI - main

The workflow is not valid. .github/workflows/test.yaml (Line: 8, Col: 5): Unexpected value ‘with’

I think the :heavy_check_mark: is only referring to the Deploy to github pages part (there is no with part in deploy.yaml).

Ah. Its the annoying array there.

Id recommended expanding that array out and following the syntax described here:

(Id type out the solution but im on mobile rn. If youre still stuck ill edit it in later!)

1 Like

OK, that helped, it’s working now :slight_smile: I actually tweaked both deploy.yaml and test.yaml. For future reference, this is what they look like now

  • deploy.yaml
name: Deploy to GitHub Pages
on:
  push:
    branches: [ "main", "master" ]
  workflow_dispatch:
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: fastai/workflows/quarto-ghp@master
  • test.yaml
name: CI
on:  [workflow_dispatch, pull_request, push]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: fastai/workflows/nbdev-ci@master
        with:
          version: '3.10'

Thanks!!

1 Like