Add e2e tests to workspace

This commit is contained in:
Sander Declerck 2025-09-05 11:33:08 +02:00
parent 7673d32912
commit 8d015fdca3
No known key found for this signature in database
4 changed files with 14 additions and 12 deletions

View file

@ -33,9 +33,6 @@ jobs:
name: Run E2E tests name: Run E2E tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults:
run:
working-directory: "test/e2e"
steps: steps:
- name: Checkout code - name: Checkout code
@ -46,11 +43,11 @@ jobs:
with: with:
node-version: "lts/*" node-version: "lts/*"
- name: Install dependencies - name: Install dependencies (root)
run: npm ci run: npm ci
- name: Run unit tests - name: Run E2E tests
run: npm test run: npm run test --workspace=test/e2e
- name: Clean up Docker resources - name: Clean up Docker resources
if: always() if: always()

View file

@ -1,10 +1,14 @@
{ {
"name": "aikido-safe-chain-workspace", "name": "aikido-safe-chain-workspace",
"private": true, "private": true,
"type": "module", "type": "module",
"workspaces": ["packages/*"], "workspaces": [
"packages/*",
"test/e2e"
],
"scripts": { "scripts": {
"test": "npm run test --workspace=packages/safe-chain", "test": "npm run test --workspace=packages/safe-chain",
"test:e2e": "npm run test --workspace=test/e2e",
"lint": "npm run lint --workspace=packages/safe-chain" "lint": "npm run lint --workspace=packages/safe-chain"
}, },
"repository": { "repository": {
@ -16,11 +20,11 @@
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.26.0", "@eslint/js": "^9.26.0",
"eslint": "^9.26.0", "eslint": "^9.26.0",
"eslint-plugin-import": "^2.31.0", "eslint-plugin-import": "^2.31.0",
"globals": "^16.1.0", "globals": "^16.1.0",
"typescript-eslint": "^8.32.0" "typescript-eslint": "^8.32.0"
}, },
"overrides": { "overrides": {
"brace-expansion@<=2.0.2": "2.0.2" "brace-expansion@<=2.0.2": "2.0.2"
} }
} }

View file

@ -6,13 +6,13 @@ ENV CI=true
WORKDIR /app WORKDIR /app
# Copy package files first for better caching # Copy package files first for better caching
COPY package*.json ./ COPY packages/safe-chain/package*.json ./
# Install dependencies # Install dependencies
RUN npm install RUN npm install
# Copy the rest of the application # Copy the rest of the application
COPY . . COPY packages/safe-chain ./
# Build the application # Build the application
RUN npm --no-git-tag-version version 1.0.0 --allow-same-version RUN npm --no-git-tag-version version 1.0.0 --allow-same-version

View file

@ -1,5 +1,6 @@
{ {
"name": "@aikidosec/safe-chain-e2e-tests", "name": "@aikidosec/safe-chain-e2e-tests",
"private": true,
"version": "1.0.0", "version": "1.0.0",
"description": "End-to-end tests for the Aikido Safe Chain", "description": "End-to-end tests for the Aikido Safe Chain",
"scripts": { "scripts": {