diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9b4f695..ea15a0d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "moonraker-home-assistant", - "image": "mcr.microsoft.com/vscode/devcontainers/python:3.12-bookworm", + "image": "mcr.microsoft.com/devcontainers/python:dev-3.13-bookworm", "postCreateCommand": "scripts/setup", "forwardPorts": [8123], "customizations": { diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60f570b..6b0da14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - name: "Set up Python" uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" cache: "pip" - name: "Install requirements" @@ -50,7 +50,7 @@ jobs: - name: Setup Python uses: "actions/setup-python@v5" with: - python-version: "3.12" + python-version: "3.13" - name: Install requirements run: python3 -m pip install -r requirements.txt - name: Run tests diff --git a/requirements.txt b/requirements.txt index bd1094e..709f9ec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -pytest-homeassistant-custom-component==0.13.178 +pytest-homeassistant-custom-component==0.13.191 moonraker-api==2.0.6 aiohttp_cors==0.7.0 pre-commit==4.0.1 diff --git a/scripts/setup b/scripts/setup index 6e2a86e..540f7f0 100755 --- a/scripts/setup +++ b/scripts/setup @@ -4,9 +4,18 @@ set -e cd "$(dirname "$0")/.." +# Install go2rtc + +HA_GO2RTC_VERSION=$(curl --silent -qI https://github.com/AlexxIT/go2rtc/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}') +echo "https://github.com/AlexxIT/go2rtc/releases/download/${HA_GO2RTC_VERSION}/go2rtc_linux_amd64" +sudo curl -o /bin/go2rtc -fL "https://github.com/AlexxIT/go2rtc/releases/download/${HA_GO2RTC_VERSION}/go2rtc_linux_amd64" +sudo chmod +x /bin/go2rtc + sudo apt-get update -sudo apt-get install -y libturbojpeg0 ffmpeg +pip install --upgrade pip +sudo apt-get upgrade -y python3 -m pip install --requirement requirements.txt +sudo apt-get install -y libturbojpeg0 ffmpeg libpcap-dev