Skip to content

Commit

Permalink
Merge pull request #27 from META-DREAMER/main
Browse files Browse the repository at this point in the history
Fix workflows
  • Loading branch information
madjin authored Jan 14, 2025
2 parents 165454a + da83233 commit 2d009e6
Show file tree
Hide file tree
Showing 20 changed files with 266,215 additions and 67,993 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,36 @@ permissions:
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15 # Add timeout to prevent hung builds

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Install dependencies
run: bun install
run: bun install --frozen-lockfile

- name: Build
run: bun run build
env:
NEXT_TELEMETRY_DISABLED: 1
CI: true

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand All @@ -44,7 +52,8 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
timeout-minutes: 10
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
163 changes: 80 additions & 83 deletions .github/workflows/test-ubuntu-24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,93 +5,90 @@ on:
workflow_dispatch:
# Run weekly to catch any system-level changes
schedule:
- cron: '0 0 * * 0' # Every Sunday at midnight UTC
- cron: "0 0 * * 0" # Every Sunday at midnight UTC

jobs:
test-ubuntu24:
name: Test on Ubuntu 24.04
runs-on: ubuntu-24.04
env:
TZ: 'America/New_York'
TZ: "America/New_York"

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: System Information
run: |
echo "Ubuntu Version:"
cat /etc/os-release
echo -e "\nPython Version:"
python --version
echo -e "\nNode Version:"
node --version
echo -e "\nNPM Version:"
npm --version
echo -e "\nInstalled Packages:"
dpkg -l | grep -E 'python|node|npm'
- name: Install Python dependencies
id: pip-install
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Node dependencies
id: npm-install
run: npm ci

- name: Test Data Processing
id: data-processing
env:
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
# Create test directories
mkdir -p data/test/daily
# Test GitHub API interaction
bash scripts/fetch_github.sh elizaos eliza --type prs --days 1 > data/test/daily/prs.json
# Test data processing
python scripts/combine_raw.py -p data/test/daily/prs.json -i data/test/daily/prs.json -c data/test/daily/prs.json -o data/test/daily/combined.json
python scripts/calculate_scores.py data/test/daily/combined.json data/test/daily/scored.json
- name: Test Site Generation
id: site-generation
run: |
npm run build
npm run generate
- name: Report Test Results
if: always()
run: |
echo "Test Results Summary:"
echo "====================="
echo "Python Dependencies: ${{ steps.pip-install.outcome }}"
echo "Node Dependencies: ${{ steps.npm-install.outcome }}"
echo "Data Processing: ${{ steps.data-processing.outcome }}"
echo "Site Generation: ${{ steps.site-generation.outcome }}"
- name: Upload Test Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: test-outputs
path: |
data/test/
.nuxt/
dist/
retention-days: 7
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: System Information
run: |
echo "Ubuntu Version:"
cat /etc/os-release
echo -e "\nPython Version:"
python --version
echo -e "\nNode Version:"
node --version
echo -e "\nNPM Version:"
npm --version
echo -e "\nInstalled Packages:"
dpkg -l | grep -E 'python|node|npm'
- name: Install Python dependencies
id: pip-install
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Node dependencies
id: bun-install
run: bun install --frozen-lockfile

- name: Test Data Processing
id: data-processing
env:
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
# Create test directories
mkdir -p data/test/daily
# Test GitHub API interaction
bash scripts/fetch_github.sh elizaos eliza --type prs --days 1 > data/test/daily/prs.json
# Test data processing
python scripts/combine_raw.py -p data/test/daily/prs.json -i data/test/daily/prs.json -c data/test/daily/prs.json -o data/test/daily/combined.json
python scripts/calculate_scores.py data/test/daily/combined.json data/test/daily/scored.json
- name: Test Site Generation
id: site-generation
run: bun run build
env:
NEXT_TELEMETRY_DISABLED: 1

- name: Report Test Results
if: always()
run: |
echo "Test Results Summary:"
echo "====================="
echo "Python Dependencies: ${{ steps.pip-install.outcome }}"
echo "Node Dependencies: ${{ steps.bun-install.outcome }}"
echo "Data Processing: ${{ steps.data-processing.outcome }}"
echo "Site Generation: ${{ steps.site-generation.outcome }}"
- name: Upload Test Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: test-outputs
path: |
data/test/
.nuxt/
dist/
retention-days: 7
Loading

0 comments on commit 2d009e6

Please sign in to comment.