From 744a38e73037d12a9e0a445f16d5f71382aa4320 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Mar 2026 19:13:38 +0000 Subject: [PATCH 1/7] Initial plan From ede1baefcffc03953d54d53b7a3d08fc3abb9704 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Mar 2026 19:15:48 +0000 Subject: [PATCH 2/7] Add GitHub Actions CI workflow to run pytest Agent-Logs-Url: https://github.com/darnstrom/lmpc/sessions/823523cf-dc74-414c-a19c-7110da3dd48c Co-authored-by: darnstrom <55484604+darnstrom@users.noreply.github.com> --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fe73484 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Julia + uses: julia-actions/setup-julia@v2 + with: + version: "1" + + - name: Install LinearMPC.jl + run: julia -e 'using Pkg; Pkg.add("LinearMPC")' + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install package and test dependencies + run: pip install . pytest + env: + PYTHON_JULIAPKG_OFFLINE: "yes" + + - name: Run tests + run: pytest tests/ + env: + PYTHON_JULIAPKG_OFFLINE: "yes" From f508ca0a4ac1378a0d0bb1fab2f6689d8768573f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Mar 2026 19:16:47 +0000 Subject: [PATCH 3/7] Restrict GITHUB_TOKEN permissions in CI workflow Agent-Logs-Url: https://github.com/darnstrom/lmpc/sessions/823523cf-dc74-414c-a19c-7110da3dd48c Co-authored-by: darnstrom <55484604+darnstrom@users.noreply.github.com> --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe73484..ffdba86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,8 @@ on: jobs: test: runs-on: ubuntu-latest + permissions: + contents: read steps: - uses: actions/checkout@v4 From 3c8499bc1d9f88583f492c206e19f6e6ead8ef98 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Mar 2026 19:24:20 +0000 Subject: [PATCH 4/7] Fix CI: let juliapkg install PythonCall.jl during package setup Agent-Logs-Url: https://github.com/darnstrom/lmpc/sessions/863fe1a6-9ea1-44e0-be85-241cab9c0daa Co-authored-by: darnstrom <55484604+darnstrom@users.noreply.github.com> --- .github/workflows/ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffdba86..f676d1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,18 +20,15 @@ jobs: with: version: "1" - - name: Install LinearMPC.jl - run: julia -e 'using Pkg; Pkg.add("LinearMPC")' - - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.x" - name: Install package and test dependencies - run: pip install . pytest - env: - PYTHON_JULIAPKG_OFFLINE: "yes" + run: | + export PYTHON_JULIAPKG_EXE=$(which julia) + pip install . pytest - name: Run tests run: pytest tests/ From 22ed30a7c19aaa0e8777d47575c1d1923f649571 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Mar 2026 19:34:27 +0000 Subject: [PATCH 5/7] Fix CI: explicitly trigger Julia environment setup before offline test run Agent-Logs-Url: https://github.com/darnstrom/lmpc/sessions/539756fb-dfbe-43e7-8792-7151f3533890 Co-authored-by: darnstrom <55484604+darnstrom@users.noreply.github.com> --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f676d1b..0ececf9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,10 @@ jobs: python-version: "3.x" - name: Install package and test dependencies - run: | - export PYTHON_JULIAPKG_EXE=$(which julia) - pip install . pytest + run: pip install . pytest + + - name: Set up Julia environment + run: PYTHON_JULIAPKG_EXE=$(which julia) python -c "import juliacall" - name: Run tests run: pytest tests/ From 5e728cdc90ccfec63e4095aa6676e629ea4ad79d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Arnstr=C3=B6m?= Date: Sat, 28 Mar 2026 20:46:54 +0100 Subject: [PATCH 6/7] update ci --- .github/workflows/ci.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ececf9..6612592 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,26 +12,30 @@ jobs: permissions: contents: read - steps: + steps: - uses: actions/checkout@v4 - name: Set up Julia uses: julia-actions/setup-julia@v2 with: - version: "1" + version: "1.10" # Explicitly use the stable LTS - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.x" + python-version: "3.12" - - name: Install package and test dependencies + - name: Install dependencies run: pip install . pytest - - name: Set up Julia environment - run: PYTHON_JULIAPKG_EXE=$(which julia) python -c "import juliacall" + - name: Initialize Julia via Python + run: python -c "import juliacall" + env: + # This tells juliapkg: "Don't download Julia, use the one I just installed" + PYTHON_JULIAPKG_EXE: julia - name: Run tests run: pytest tests/ env: + PYTHON_JULIAPKG_EXE: julia PYTHON_JULIAPKG_OFFLINE: "yes" From cd019f97d75f5a4bd85c0a71c9c1de12adc2b909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Arnstr=C3=B6m?= <55484604+darnstrom@users.noreply.github.com> Date: Sat, 28 Mar 2026 20:49:25 +0100 Subject: [PATCH 7/7] Fix indentation in CI workflow YAML file --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6612592..66f41ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - - steps: + steps: - uses: actions/checkout@v4 - name: Set up Julia