+
Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
61 changes: 13 additions & 48 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: DevForge CI/CD Pipeline
name: Audityzer CI/CD Pipeline

on:
push:
Expand Down Expand Up @@ -69,8 +69,8 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install chromium

- name: Start DevForge Server
run: node bin/dev-server-runner.js start
- name: Start Audityzer Server
run: node bin/audityzer.js server start
env:
SERVER_PORT: 5050
PUBLIC_DIR: 'public'
Expand All @@ -79,15 +79,14 @@ jobs:
- name: Run Unit Tests
run: npm test

- name: Stop DevForge Server
run: node bin/dev-server-runner.js stop
- name: Stop Audityzer Server
run: node bin/audityzer.js server stop
- name: Upload Test Results
uses: actions/upload-artifact@v3.1.3
if: always()
with:
name: unit-test-results
path: test-results/
test-results/

security_tests:
name: Run Security Tests
Expand All @@ -111,8 +110,8 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install chromium

- name: Start DevForge Server
run: node bin/dev-server-runner.js start
- name: Start Audityzer Server
run: node bin/audityzer.js server start
env:
SERVER_PORT: 5050
PUBLIC_DIR: 'public'
Expand All @@ -125,22 +124,22 @@ jobs:
MOCK_MODE: 'true'

- name: Run Flash Loan Attack Tests
run: npx playwright test examples/security-bug-tests/flash-loan-attack.test.ts
run: npx playwright test tests/security-bug-tests/flash-loan-attack.test.js
env:
MOCK_MODE: 'true'

- name: Run Eth Sign Phishing Tests
run: npm run test:phishing
run: npm run test:vuln:phishing
env:
MOCK_MODE: 'true'

- name: Run Reentrancy Tests
run: npm run test:reentrancy
run: npm run test:vuln:reentrancy
env:
MOCK_MODE: 'true'

- name: Stop DevForge Server
run: node bin/dev-server-runner.js stop
- name: Stop Audityzer Server
run: node bin/audityzer.js server stop
if: always()

- name: Upload Security Test Results
Expand All @@ -154,7 +153,7 @@ jobs:

- name: Generate Security Report
if: success()
run: npm run report:generate
run: node bin/audityzer.js report --format html

- name: Upload Security Report
uses: actions/upload-artifact@v3.1.3
Expand All @@ -163,40 +162,6 @@ jobs:
name: security-report
path: |
reports/

docker_build:
name: Build and Test Docker Image
runs-on: ubuntu-latest
needs: [test, security_tests]

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build Docker Image
uses: docker/build-push-action@v2
with:
context: .
push: false
load: true
tags: devforge:test
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Test Docker Image
run: |
docker run --name devforge-test -d -p 5050:5050 devforge:test
sleep 5
curl -s http://localhost:5050/health || curl -s http://localhost:5051/health
docker stop devforge-test

build:
name: Build Package
runs-on: ubuntu-latest
needs: [test, security_tests]
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'

steps:
Expand Down
94 changes: 46 additions & 48 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,63 +1,61 @@
node_modules
# Dependencies
node_modules/

# Build outputs
dist/
build/

# Test outputs
test-results/
playwright-report/
reports/
test-user-data-dir/

# Coverage reports
coverage/

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.firebase-config.json

# Coverage reports
coverage/
.nyc_output/
playwright-report/
test-results/
junit.xml
codecov
codecov.SHA256SUM*
.coverage
coverage.json
coverage.lcov
# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Build outputs
dist/
build/
.cache/
# Editor directories and files
.idea/
.vscode/
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# IDE and OS specific files
# OS generated files
.DS_Store
.idea/
.vscode/*
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/settings.json
*.swp
*.swo
*~
*.log
Thumbs.db

# Additional exclusions for size reduction
reports/
test-output/
test-user-data-dir/
# Package files
*.tgz
Audityzer-*.tgz
playwright-report/
test-results/
debug-logs/
test-user-data-dir/
extensions/metamask/
darkforest-v0.6/
trace/
.buildx-cache

# Package outputs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# Temporary files
.tmp/
temp/

node_modules
dist
.env
# Server logs
server.log

# Lighthouse reports
lighthouse-report*.html

# Image size reports
image-size-*.txt

# Local configuration
.firebase-config.json
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
{
"workbench.editor.enablePreview": true
}
Loading
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载