Skip to content
Merged
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
46 changes: 30 additions & 16 deletions .github/workflows/dependency-updater.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Update Dependencies
name: Update dependencies

on:
schedule:
# Run every hour
Comment thread
nikhilwoodruff marked this conversation as resolved.
- cron: '0 * * * *'
# Run every 15 minutes
- cron: '*/15 * * * *'
workflow_dispatch: # Allow manual triggering

jobs:
update-dependencies:
name: Update dependencies
name: File update PR
runs-on: ubuntu-latest

permissions:
Expand All @@ -18,6 +18,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Checkout main branch
with:
ref: main
env:
GITHUB_TOKEN: ${{ secrets.POLICYENGINE_BOT_TOKEN }}

- name: Install uv
uses: astral-sh/setup-uv@v5
Expand Down Expand Up @@ -47,15 +52,24 @@ jobs:

- name: Create pull request
if: steps.update.outputs.changes_detected == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update dependencies
branch: update-dependencies
base: main
delete-branch: true
title: "Update dependencies"
body: |
Automated dependency updates

This PR was automatically created by the dependency update workflow.
run: |
git config --global user.name "policyengine-auto"
git config --global user.email "policyengine-auto@users.noreply.github.com"

git checkout -b update-dependencies
git add .
git commit -m "Update dependencies"
git push origin update-dependencies --force

# Try to create PR, ignore if it already exists
gh pr create \
--title "Update dependencies" \
--body "Automated dependency updates

This PR was automatically created by the dependency update workflow.

Last updated: $(date)" \
--base main \
--head update-dependencies || echo "PR may already exist, continuing..."
env:
GITHUB_TOKEN: ${{ secrets.POLICYENGINE_BOT_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
COMMIT_TAG: ${{ github.sha }}
jobs:
build:
name: Build
name: Build and test
# Any runner supporting Node 20 or newer
runs-on: ubuntu-latest
environment: beta
Expand Down Expand Up @@ -47,3 +47,5 @@ jobs:
architecture: x64
- name: Build application
run: make build
- name: Run tests
run: make test
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ update:
$(MAKE) -C $$dir update; \
done

test:
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir test; \
done

dev-api-full:
echo "Starting API (full) in dev mode"
cd projects/policyengine-api-full && make dev
Expand Down