Skip to content

Code base Improvement consistent with the code blueprint #34

Code base Improvement consistent with the code blueprint

Code base Improvement consistent with the code blueprint #34

name: Integration Tests
on:
push:
branches: [ main, develop ]
paths:
- 'tests/integration/**'
- 'contract/**'
pull_request:
branches: [ main, develop ]
paths:
- 'tests/integration/**'
- 'contract/**'
jobs:
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Add wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Install dependencies
run: npm ci --workspaces
- name: Compile contracts
run: npm run build:contracts
- name: Run integration tests
run: npm run test:integration
timeout-minutes: 30
- name: Upload test results
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results-${{ matrix.node-version }}
path: tests/integration/test-results/
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci --workspaces
- name: Generate coverage report
run: npm --workspace tests/integration run test:coverage || echo "Coverage generation failed - continuing..."
timeout-minutes: 30
- name: Upload coverage to Codecov
if: success()
uses: codecov/codecov-action@v4
with:
file: tests/integration/coverage/coverage.json
flags: integration-tests
name: Integration Tests Coverage
fail_ci_if_error: false
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci --workspaces
- name: Run linter
run: npm --workspace tests/integration run test:lint || echo "Linting failed - continuing..."
timeout-minutes: 15