Skip to content

Commit d42ef4b

Browse files
authored
Merge pull request #1 from letehaha/feat/ci
feat: add CI
2 parents 5180b8f + 22264ca commit d42ef4b

File tree

4 files changed

+74
-0
lines changed

4 files changed

+74
-0
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
defaults:
9+
run:
10+
working-directory: packages/typescript
11+
12+
jobs:
13+
check:
14+
name: Lint, typecheck & test
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: oven-sh/setup-bun@v2
20+
21+
- run: bun install --frozen-lockfile
22+
23+
- run: bun run lint
24+
25+
- run: bun run typecheck
26+
27+
- run: bun run test
28+
29+
- name: Run read-only integration tests
30+
env:
31+
WALUTOMAT_API_KEY: ${{ secrets.WALUTOMAT_API_KEY }}
32+
WALUTOMAT_PRIVATE_KEY: ${{ secrets.WALUTOMAT_PRIVATE_KEY }}
33+
run: >
34+
bunx vitest run
35+
--config vitest.integration.config.ts
36+
src/__integration__/account.integration.test.ts
37+
src/__integration__/market-fx.integration.test.ts

.github/workflows/integration.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Integration tests
2+
3+
on:
4+
schedule:
5+
- cron: "0 6 * * *"
6+
workflow_dispatch:
7+
8+
defaults:
9+
run:
10+
working-directory: packages/typescript
11+
12+
jobs:
13+
integration:
14+
name: Read-only integration smoke tests
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: oven-sh/setup-bun@v2
20+
21+
- run: bun install --frozen-lockfile
22+
23+
- name: Run safe (read-only) integration tests
24+
env:
25+
WALUTOMAT_API_KEY: ${{ secrets.WALUTOMAT_API_KEY }}
26+
WALUTOMAT_PRIVATE_KEY: ${{ secrets.WALUTOMAT_PRIVATE_KEY }}
27+
run: >
28+
bunx vitest run
29+
--config vitest.integration.config.ts
30+
src/__integration__/account.integration.test.ts
31+
src/__integration__/market-fx.integration.test.ts

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Walutomat SDK
22

3+
[![CI](https://github.com/letehaha/walutomat-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/letehaha/walutomat-sdk/actions/workflows/ci.yml)
4+
[![Integration tests](https://github.com/letehaha/walutomat-sdk/actions/workflows/integration.yml/badge.svg)](https://github.com/letehaha/walutomat-sdk/actions/workflows/integration.yml)
5+
36
Unofficial SDK clients for the [Walutomat API v2.0.0](https://api.walutomat.pl/v2.0.0/).
47

58
Walutomat is a Polish peer-to-peer currency exchange platform operated by Currency One. This SDK provides typed clients for their REST API, covering wallet management, transfers, direct FX, and the P2P market order book.

packages/typescript/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# walutomat-sdk
22

3+
[![CI](https://github.com/letehaha/walutomat-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/letehaha/walutomat-sdk/actions/workflows/ci.yml)
4+
[![Integration tests](https://github.com/letehaha/walutomat-sdk/actions/workflows/integration.yml/badge.svg)](https://github.com/letehaha/walutomat-sdk/actions/workflows/integration.yml)
5+
36
Unofficial TypeScript client for the [Walutomat API v2.0.0](https://api.walutomat.pl/v2.0.0/).
47

58
Zero dependencies — uses native `fetch` and `node:crypto`.

0 commit comments

Comments
 (0)