Skip to content

Fix core offer functionality: resolve PDA escrow mismatch and compilation errors #113

Fix core offer functionality: resolve PDA escrow mismatch and compilation errors

Fix core offer functionality: resolve PDA escrow mismatch and compilation errors #113

Workflow file for this run

name: PR Build and Test
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Unit tests
run: npm test
- name: Notify PR
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '✅ Build and unit tests completed successfully. E2E tests will run separately.'
})
e2e-tests:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Puppeteer dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
chromium-browser \
libgbm1 \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
libasound2 \
libpangocairo-1.0-0 \
libxss1 \
xvfb
- name: Set up Puppeteer environment variables
run: |
echo "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true" >> $GITHUB_ENV
echo "PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser" >> $GITHUB_ENV
- name: Start Next.js dev server
run: |
npm run dev &
echo "Waiting for dev server to start..."
sleep 20
env:
NODE_ENV: test
- name: Run E2E tests with Xvfb
run: |
mkdir -p screenshots
xvfb-run --server-args="-screen 0 1280x720x24" npm run test:e2e
- name: Archive screenshots
uses: actions/upload-artifact@v3
if: always()
with:
name: e2e-screenshots
path: screenshots/
retention-days: 5
- name: Notify PR with E2E results
uses: actions/github-script@v6
if: always()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const outcome = '${{ job.status }}' === 'success' ? '✅ E2E tests passed' : '❌ E2E tests failed';
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `${outcome} - [See detailed logs](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId})`
})