mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Add e2e tests
This commit is contained in:
parent
fdef99931e
commit
c00abfb054
8 changed files with 555 additions and 0 deletions
70
.github/workflows/e2e.yml
vendored
Normal file
70
.github/workflows/e2e.yml
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
name: E2E Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
e2e-tests:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
node-version: [18, 20, 22]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Setup package managers (Ubuntu/macOS)
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: |
|
||||
# Install yarn
|
||||
npm install -g yarn
|
||||
|
||||
# Install pnpm
|
||||
npm install -g pnpm
|
||||
|
||||
# Verify installations
|
||||
npm --version
|
||||
yarn --version
|
||||
pnpm --version
|
||||
|
||||
- name: Setup package managers (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
# Install yarn
|
||||
npm install -g yarn
|
||||
|
||||
# Install pnpm
|
||||
npm install -g pnpm
|
||||
|
||||
# Verify installations
|
||||
npm --version
|
||||
yarn --version
|
||||
pnpm --version
|
||||
shell: pwsh
|
||||
|
||||
- name: Install safe-chain globally
|
||||
run: npm install -g .
|
||||
|
||||
- name: Run unit tests
|
||||
run: npm test
|
||||
|
||||
- name: Run linting
|
||||
run: npm run lint
|
||||
|
||||
- name: Run E2E tests
|
||||
run: npm run test:e2e
|
||||
Loading…
Add table
Add a link
Reference in a new issue