Skip to content

Commit 3024138

Browse files
committed
WIP
1 parent 1d7bcea commit 3024138

File tree

2 files changed

+107
-100
lines changed

2 files changed

+107
-100
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ trim_trailing_whitespace = true
99
insert_final_newline = true
1010
charset = utf-8
1111
end_of_line = lf
12+
13+
[*.yml]
14+
indent_size = 2

.github/workflows/test.yml

Lines changed: 104 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Test
22

33
on:
44
push:
5-
branches:
6-
- main
75
pull_request:
86
types:
97
- opened
@@ -21,103 +19,109 @@ jobs:
2119
python-version: "3.11"
2220
- name: Install tox
2321
run: uv tool install tox --with tox-uv --with tox-gh
22+
- name: Setup upterm session
23+
uses: lhotari/action-upterm@v1
24+
with:
25+
limit-access-to-actor: true
26+
limit-access-to-users: huynguyengl99
27+
wait-timeout-minutes: 5
2428
- name: Run lint
2529
run: tox -e lint
26-
27-
test:
28-
runs-on: ubuntu-latest
29-
strategy:
30-
matrix:
31-
python-version: ["3.11", "3.12", "3.13"]
32-
fail-fast: false
33-
services:
34-
postgres:
35-
image: postgres
36-
env:
37-
POSTGRES_PASSWORD: chanx_test_pass
38-
POSTGRES_DB: chanx_test_db
39-
POSTGRES_USER: chanx_test_user
40-
options: >-
41-
--health-cmd pg_isready
42-
--health-interval 10s
43-
--health-timeout 5s
44-
--health-retries 5
45-
ports:
46-
- 5432:5432
47-
redis:
48-
image: redis
49-
options: >-
50-
--health-cmd "redis-cli ping"
51-
--health-interval 10s
52-
--health-timeout 5s
53-
--health-retries 5
54-
ports:
55-
- 6379:6379
56-
env:
57-
POSTGRES_DB: chanx_test_db
58-
POSTGRES_USER: chanx_test_user
59-
POSTGRES_PASSWORD: chanx_test_pass
60-
POSTGRES_HOST: localhost
61-
POSTGRES_PORT: 5432
62-
REDIS_HOST: redis://localhost:6379
63-
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}
64-
steps:
65-
- uses: actions/checkout@v4
66-
- name: Install the latest version of uv
67-
uses: astral-sh/setup-uv@v5
68-
with:
69-
enable-cache: true
70-
python-version: ${{ matrix.python-version }}
71-
- name: Install tox
72-
run: uv tool install tox --with tox-uv --with tox-gh
73-
- name: Run tests
74-
run: tox
75-
76-
coverage:
77-
runs-on: ubuntu-latest
78-
services:
79-
postgres:
80-
image: postgres
81-
env:
82-
POSTGRES_PASSWORD: chanx_test_pass
83-
POSTGRES_DB: chanx_test_db
84-
POSTGRES_USER: chanx_test_user
85-
options: >-
86-
--health-cmd pg_isready
87-
--health-interval 10s
88-
--health-timeout 5s
89-
--health-retries 5
90-
ports:
91-
- 5440:5432
92-
redis:
93-
image: redis
94-
options: >-
95-
--health-cmd "redis-cli ping"
96-
--health-interval 10s
97-
--health-timeout 5s
98-
--health-retries 5
99-
ports:
100-
- 6390:6379
101-
env:
102-
POSTGRES_DB: chanx_test_db
103-
POSTGRES_USER: chanx_test_user
104-
POSTGRES_PASSWORD: chanx_test_pass
105-
POSTGRES_HOST: localhost
106-
POSTGRES_PORT: 5440
107-
REDIS_HOST: redis://localhost:6390
108-
steps:
109-
- uses: actions/checkout@v4
110-
- name: Install the latest version of uv
111-
uses: astral-sh/setup-uv@v5
112-
with:
113-
enable-cache: true
114-
python-version: "3.11"
115-
- name: Install tox
116-
run: uv tool install tox --with tox-uv --with tox-gh
117-
- name: Run coverage
118-
run: tox -e coverage
119-
- name: Upload coverage reports to Codecov
120-
uses: codecov/codecov-action@v5
121-
with:
122-
token: ${{ secrets.CODECOV_TOKEN }}
123-
slug: huynguyengl99/chanx
30+
#
31+
# test:
32+
# runs-on: ubuntu-latest
33+
# strategy:
34+
# matrix:
35+
# python-version: ["3.11", "3.12", "3.13"]
36+
# fail-fast: false
37+
# services:
38+
# postgres:
39+
# image: postgres
40+
# env:
41+
# POSTGRES_PASSWORD: chanx_test_pass
42+
# POSTGRES_DB: chanx_test_db
43+
# POSTGRES_USER: chanx_test_user
44+
# options: >-
45+
# --health-cmd pg_isready
46+
# --health-interval 10s
47+
# --health-timeout 5s
48+
# --health-retries 5
49+
# ports:
50+
# - 5432:5432
51+
# redis:
52+
# image: redis
53+
# options: >-
54+
# --health-cmd "redis-cli ping"
55+
# --health-interval 10s
56+
# --health-timeout 5s
57+
# --health-retries 5
58+
# ports:
59+
# - 6379:6379
60+
# env:
61+
# POSTGRES_DB: chanx_test_db
62+
# POSTGRES_USER: chanx_test_user
63+
# POSTGRES_PASSWORD: chanx_test_pass
64+
# POSTGRES_HOST: localhost
65+
# POSTGRES_PORT: 5432
66+
# REDIS_HOST: redis://localhost:6379
67+
# TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}
68+
# steps:
69+
# - uses: actions/checkout@v4
70+
# - name: Install the latest version of uv
71+
# uses: astral-sh/setup-uv@v5
72+
# with:
73+
# enable-cache: true
74+
# python-version: ${{ matrix.python-version }}
75+
# - name: Install tox
76+
# run: uv tool install tox --with tox-uv --with tox-gh
77+
# - name: Run tests
78+
# run: tox
79+
#
80+
# coverage:
81+
# runs-on: ubuntu-latest
82+
# services:
83+
# postgres:
84+
# image: postgres
85+
# env:
86+
# POSTGRES_PASSWORD: chanx_test_pass
87+
# POSTGRES_DB: chanx_test_db
88+
# POSTGRES_USER: chanx_test_user
89+
# options: >-
90+
# --health-cmd pg_isready
91+
# --health-interval 10s
92+
# --health-timeout 5s
93+
# --health-retries 5
94+
# ports:
95+
# - 5440:5432
96+
# redis:
97+
# image: redis
98+
# options: >-
99+
# --health-cmd "redis-cli ping"
100+
# --health-interval 10s
101+
# --health-timeout 5s
102+
# --health-retries 5
103+
# ports:
104+
# - 6390:6379
105+
# env:
106+
# POSTGRES_DB: chanx_test_db
107+
# POSTGRES_USER: chanx_test_user
108+
# POSTGRES_PASSWORD: chanx_test_pass
109+
# POSTGRES_HOST: localhost
110+
# POSTGRES_PORT: 5440
111+
# REDIS_HOST: redis://localhost:6390
112+
# steps:
113+
# - uses: actions/checkout@v4
114+
# - name: Install the latest version of uv
115+
# uses: astral-sh/setup-uv@v5
116+
# with:
117+
# enable-cache: true
118+
# python-version: "3.11"
119+
# - name: Install tox
120+
# run: uv tool install tox --with tox-uv --with tox-gh
121+
# - name: Run coverage
122+
# run: tox -e coverage
123+
# - name: Upload coverage reports to Codecov
124+
# uses: codecov/codecov-action@v5
125+
# with:
126+
# token: ${{ secrets.CODECOV_TOKEN }}
127+
# slug: huynguyengl99/chanx

0 commit comments

Comments
 (0)