Update #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update | |
on: | |
workflow_dispatch: | |
schedule: | |
# Every Monday, 7:30 AM (Berlin) | |
- cron: "30 5 * * 1" | |
jobs: | |
python: | |
env: | |
UV_SYSTEM_PYTHON: 1 | |
if: github.repository == 'maxplanck-ie/parkour2' | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ['3.10', 3.11, 3.12, 3.13] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up UV for py ${{ matrix.python-version }} | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "backend/requirements/**/*.txt" | |
- name: Backend Update | |
run: | | |
export this=backend/requirements/${{ matrix.python-version }} | |
mkdir -p $this | |
uv pip compile --no-progress --universal --python-version ${{ matrix.python-version }} \ | |
backend/requirements/base.in -o ${this}/base.txt | |
uv pip compile --no-progress --universal --python-version ${{ matrix.python-version }} \ | |
backend/requirements/dev.in -c ${this}/base.txt -o ${this}/dev.txt | |
uv pip compile --no-progress --universal --python-version ${{ matrix.python-version }} \ | |
backend/requirements/testing.in -c ${this}/dev.txt -o ${this}/testing.txt | |
- name: Test installation | |
run: uv pip install -r backend/requirements/${{ matrix.python-version }}/testing.txt | |
vuejs: | |
if: github.repository == 'maxplanck-ie/parkour2' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Frontend Update | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'frontend/package.json' | |
- run: npm install -g npm-check-updates | |
- run: cd frontend && ncu -u | |
create-pr: | |
needs: [python, vuejs] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create Combined PR | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
branch: update/dependencies | |
title: Update dependencies | |
body: | | |
Update all frontend and backend dependencies. | |
- Backend: Updated Python dependencies for all supported versions | |
- Frontend: Updated Node.js dependencies | |
delete-branch: true | |
labels: | | |
Dependencies | |
commit-message: | | |
Update all dependencies | |
- Backend: Run of `uv pip compile` to update all python dependencies | |
- Frontend: Run of `npm-check-updates` to update all node dependencies |