Comprehensive Tests #248
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Comprehensive Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| schedule: | |
| - cron: '0 6 * * *' | |
| jobs: | |
| contract-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| cache-dependency-path: contract/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: ./contract | |
| - name: Run unit tests | |
| run: npx hardhat test | |
| working-directory: ./contract | |
| - name: Run integration tests | |
| run: npx hardhat test test/integration/ | |
| working-directory: ./contract | |
| - name: Gas usage report | |
| run: npx hardhat test --reporter hardhat-gas-reporter | |
| working-directory: ./contract | |
| frontend-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: ./frontend | |
| - name: Run unit tests | |
| run: npm test | |
| working-directory: ./frontend | |
| - name: Run E2E tests | |
| run: npm run test:e2e | |
| working-directory: ./frontend | |
| security-audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Audit frontend dependencies | |
| run: npm audit --audit-level moderate | |
| working-directory: ./frontend | |
| - name: Audit contract dependencies | |
| run: npm audit --audit-level moderate | |
| working-directory: ./contract |