Skip to content

Update python-dateutil requirement from <=2.8.2 to <=2.9.0.post0 #699

Update python-dateutil requirement from <=2.8.2 to <=2.9.0.post0

Update python-dateutil requirement from <=2.8.2 to <=2.9.0.post0 #699

Workflow file for this run

name: Build image, lint, and run tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install uv
python -m uv venv
python -m uv pip install .[test]
- name: Lint with ruff
run: |
source .venv/bin/activate
ruff check .
- name: Test with pytest
run: |
source .venv/bin/activate
pytest
- name: Build web app
run: |
cd gonotego/settings-server
npm install
npm run build
cd ../..
- name: Archive web app build
uses: actions/upload-artifact@v4
with:
name: web-app-dist
path: gonotego/settings-server/dist
build_image:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download web app build
uses: actions/download-artifact@v4
with:
name: web-app-dist
path: web-app-dist
# /home/runner/work/GoNoteGo/GoNoteGo/web-app-dist
- name: Verify web app download
run: |
echo "Checking contents of web-app-dist:"
ls -la web-app-dist
if [ ! -f "web-app-dist/index.html" ]; then
echo "ERROR: web-app-dist directory does not contain expected files!"
exit 1
fi
- uses: dbieber/arm-runner-action@v1.0.9
id: build_image
with:
base_image: https://downloads.raspberrypi.com/raspios_armhf/images/raspios_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf.img.xz
bootpartition: 1
rootpartition: 2
image_additional_mb: 6000
extra_files_path: /home/runner/work/GoNoteGo/GoNoteGo/web-app-dist
extra_files_mnt_path: web-app-dist
commands: |
echo "Updating package lists..."
sudo apt-get update
# Clean up apt cache to free up space
sudo apt-get clean
echo "Installing dependencies!"
sudo apt install -y git firefox-esr xvfb portaudio19-dev libatlas-base-dev redis-server espeak \
rustc python3-dev libopenblas-dev iptables iptables-persistent nodejs npm
# Clean up after installation
sudo apt-get clean
echo "Installing Go Note Go!"
mkdir -p /home/pi/code/github/dbieber
cd /home/pi/code/github/dbieber
git clone https://github.com/dbieber/GoNoteGo.git
cd GoNoteGo
# Checkout the specific commit
git checkout $GITHUB_SHA
# Make scripts executable
chmod +x /home/pi/code/github/dbieber/GoNoteGo/.github/scripts/*.sh
echo "Including web app"
echo "Checking web app files at /web-app-dist:"
ls -la /web-app-dist
echo "Creating settings-server directory:"
mkdir -p /home/pi/code/github/dbieber/GoNoteGo/gonotego/settings-server/
echo "Copying web app files:"
cp -r /web-app-dist /home/pi/code/github/dbieber/GoNoteGo/gonotego/settings-server/dist
echo "Verifying copied web app files:"
ls -la /home/pi/code/github/dbieber/GoNoteGo/gonotego/settings-server/dist
# Setup Python environment
echo "Setting up Python environment"
python3 -m venv env
./env/bin/pip install -e . # Install Python dependencies
echo "Setting up Go Note Go:"
cp gonotego/settings/secure_settings_template.py gonotego/settings/secure_settings.py
echo "Manually edit secure_settings.py to configure your settings."
mkdir -p /home/pi/secrets
echo "Manually transfer secrets to /home/pi/secrets."
# Ensure repository is owned by pi user instead of root
chown -R pi:pi /home/pi/code/github/dbieber/GoNoteGo
# Install geckodriver
bash /home/pi/code/github/dbieber/GoNoteGo/.github/scripts/install_geckodriver.sh
# Set up a wifi access point
bash /home/pi/code/github/dbieber/GoNoteGo/.github/scripts/setup_wifi_ap.sh
# Setup system boot configuration
bash /home/pi/code/github/dbieber/GoNoteGo/.github/scripts/setup_boot.sh
# Setup bash history
cat /home/pi/code/github/dbieber/GoNoteGo/.github/templates/bash_history >> /home/pi/.bash_history
- name: Compress the release image
run: |
sudo fdisk -l
sudo ls /etc/xdg/autostart/
mv ${{ steps.build_image.outputs.image }} go-note-go.img
xz -0 -T 0 -v go-note-go.img
- name: Upload release image
uses: actions/upload-artifact@v4
with:
name: Release image
path: go-note-go.img.xz