Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions .github/workflows/test-invoices.yml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Tests

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Type Check
run: npx tsc --noEmit

- name: Start Test Mint
run: |
docker run -d \
--name test-mint \
-p 3338:3338 \
-e MINT_BACKEND_BOLT11_SAT=FakeWallet \
-e MINT_LISTEN_HOST=0.0.0.0 \
-e MINT_LISTEN_PORT=3338 \
-e MINT_PRIVATE_KEY=ci-test \
cashubtc/nutshell:0.16.0 \
sh -c "poetry install && poetry run mint"

for i in {1..30}; do
if curl -f http://localhost:3338/v1/info 2>/dev/null; then
echo "Mint ready"
break
fi
sleep 1
done

- name: Run Tests
env:
CI: true
MINT_URL: http://localhost:3338
run: npm test -- --run

- name: Build
run: npm run build

- name: Cleanup
if: always()
run: |
docker stop test-mint || true
docker rm test-mint || true
Loading