fix: eslint config & typescript errors #92
This file contains 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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 9.14.4 | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install:all | |
- name: Type check | |
run: pnpm type-check | |
- name: Build | |
run: pnpm build | |
- name: Check formatting | |
run: pnpm prettier --check "src/**/!(*d).ts" | |
- name: Lint | |
run: pnpm eslint . --max-warnings 0 | |
- name: Verify no tests were removed | |
run: pnpm check-test-files | |
- name: Run tests | |
env: | |
NODE_OPTIONS: '--experimental-vm-modules --no-warnings' | |
SIGNING_ADDRESS: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266' | |
ALLOCATOR_ADDRESS: '0x2345678901234567890123456789012345678901' | |
PRIVATE_KEY: '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80' | |
DOMAIN: 'smallocator.example' | |
BASE_URL: 'https://smallocator.example' | |
DATABASE_URL: 'sqlite::memory:' | |
SKIP_SIGNING_VERIFICATION: 'true' | |
NODE_ENV: 'test' | |
run: | | |
mkdir -p test-data | |
pnpm test | |
- name: Run smoke tests | |
env: | |
NODE_OPTIONS: '--experimental-vm-modules --no-warnings' | |
SIGNING_ADDRESS: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266' | |
ALLOCATOR_ADDRESS: '0x2345678901234567890123456789012345678901' | |
PRIVATE_KEY: '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80' | |
DOMAIN: 'smallocator.example' | |
BASE_URL: 'https://smallocator.example' | |
DATABASE_URL: 'sqlite::memory:' | |
SKIP_SIGNING_VERIFICATION: 'true' | |
NODE_ENV: 'test' | |
run: pnpm smoke-test |