Skip to content

Commit 7aee5c5

Browse files
committed
chore: add .github/workflows/ci.yml
1 parent 4a4cc76 commit 7aee5c5

1 file changed

Lines changed: 86 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ci-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test-python:
15+
name: Python Tests
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
python-version: ["3.11", "3.12"]
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
cache: pip
28+
29+
- name: Install dependencies
30+
run: |
31+
pip install --upgrade pip
32+
pip install -e ".[dev]"
33+
34+
- name: Lint with ruff
35+
run: ruff check .
36+
37+
- name: Format check with black
38+
run: black --check .
39+
40+
- name: Type check with mypy
41+
run: mypy src/
42+
43+
- name: Run tests
44+
run: pytest tests/ -v --tb=short
45+
46+
test-typescript:
47+
name: TypeScript Tests
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- name: Set up Node.js
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: "20"
56+
cache: npm
57+
58+
- name: Install dependencies
59+
run: npm ci
60+
61+
- name: Lint
62+
run: npm run lint
63+
64+
- name: Type check
65+
run: npm run typecheck
66+
67+
- name: Run tests
68+
run: npm test
69+
70+
docker-build:
71+
name: Docker Build
72+
runs-on: ubuntu-latest
73+
steps:
74+
- uses: actions/checkout@v4
75+
76+
- name: Set up Docker Buildx
77+
uses: docker/setup-buildx-action@v3
78+
79+
- name: Build Docker image
80+
uses: docker/build-push-action@v5
81+
with:
82+
context: .
83+
push: false
84+
tags: eseilane/eseilane:latest
85+
cache-from: type=gha
86+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)