Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Python Package using Conda

on: [push]

Copilot AI Apr 4, 2026

Copy link

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 a pull_request trigger (and optionally workflow_dispatch) so changes are tested before merge.

Suggested change
on: [push]
on:
push:
pull_request:
workflow_dispatch:

Copilot uses AI. Check for mistakes.

jobs:
build-linux:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
max-parallel: 5
Comment on lines +10 to +11

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strategy: max-parallel has no effect here because the job doesn't define a matrix. Consider removing it or introducing a matrix (e.g., multiple Python versions/OS) if parallelism is intended.

Suggested change
strategy:
max-parallel: 5

Copilot uses AI. Check for mistakes.

steps:
- uses: actions/checkout@v4
- 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
Comment on lines +15 to +22

Copilot AI Apr 4, 2026

Copy link

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.

Suggested change
- 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 uses AI. Check for mistakes.
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
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
Comment on lines +28 to +35

Copilot AI Apr 4, 2026

Copy link

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.

Suggested change
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 uses AI. Check for mistakes.
pytest

Copilot AI Apr 4, 2026

Copy link

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.

Suggested change
pytest
if find . \( -name 'test_*.py' -o -name '*_test.py' \) | grep -q .; then
pytest
else
echo "No pytest test files found; skipping pytest."
fi

Copilot uses AI. Check for mistakes.
2 changes: 0 additions & 2 deletions Requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
3. requirements.txt

opencv-python
numpy
3 changes: 2 additions & 1 deletion environment.yml
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
Expand Down
Loading