-
Notifications
You must be signed in to change notification settings - Fork 0
Fix failing CI: update Python 3.6.9 → 3.10, restore deleted workflow #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||||||||||||||||||||||||||||||
| name: Python Package using Conda | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| on: [push] | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||
| build-linux: | ||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||||||
| max-parallel: 5 | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+10
to
+11
|
||||||||||||||||||||||||||||||||||
| strategy: | |
| max-parallel: 5 |
Copilot
AI
Apr 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workflow invokes conda but never installs/initializes Miniconda/Mambaforge. On GitHub-hosted runners conda (and $CONDA) are not guaranteed to exist, so echo $CONDA/bin and subsequent conda env update can fail. Use conda-incubator/setup-miniconda (or equivalent) to provision conda and activate the environment, and avoid mixing actions/setup-python with conda-managed Python in the same job.
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: '3.10' | |
| - name: Add conda to system path | |
| run: | | |
| # $CONDA is an environment variable pointing to the root of the miniconda directory | |
| echo $CONDA/bin >> $GITHUB_PATH | |
| - name: Set up Miniconda with Python 3.10 | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| python-version: '3.10' | |
| auto-activate-base: true | |
| activate-environment: base |
Copilot
AI
Apr 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conda install flake8 / conda install pytest are missing -y (or equivalent non-interactive flag). In CI these commands can block waiting for confirmation, causing the job to hang.
| conda install flake8 | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Test with pytest | |
| run: | | |
| conda install pytest | |
| conda install -y flake8 | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Test with pytest | |
| run: | | |
| conda install -y pytest |
Copilot
AI
Apr 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow runs pytest, but the repository doesn’t appear to contain any test files (no test_*.py / *_test.py found). pytest will typically exit with code 5 when no tests are collected, which would keep CI failing. Either add at least one minimal smoke test, or adjust the workflow to skip/remove the pytest step until tests exist.
| pytest | |
| if find . \( -name 'test_*.py' -o -name '*_test.py' \) | grep -q .; then | |
| pytest | |
| else | |
| echo "No pytest test files found; skipping pytest." | |
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,2 @@ | ||
| 3. requirements.txt | ||
|
|
||
| opencv-python | ||
| numpy |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| name: carnd | ||
| dependencies: | ||
| - python==3.6.9 | ||
| - python=3.10 | ||
| - pip | ||
| - numpy | ||
| - matplotlib | ||
| - jupyter | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow only runs on
push. If the intent is to restore CI for PR validation as well, add apull_requesttrigger (and optionallyworkflow_dispatch) so changes are tested before merge.