3131 - name : Lint
3232 run : npx nx run-many --target=lint
3333
34- test :
35- runs-on : ubuntu-latest
34+ test-py :
35+ runs-on : ${{ matrix.os }}
36+ strategy :
37+ matrix :
38+ python-version : [ 3.11 ]
39+ os : [ ubuntu-latest ]
40+ postgres-version : [ 15-bookworm ]
41+ services :
42+ postgres :
43+ image : postgres:${{ matrix.postgres-version }}
44+ env :
45+ POSTGRES_PASSWORD : " password"
46+ POSTGRES_USER : " sftkit"
47+ POSTGRES_DB : " sftkit_test"
48+ options : >-
49+ --health-cmd pg_isready
50+ --health-interval 10s
51+ --health-timeout 5s
52+ --health-retries 5
53+ ports :
54+ - 5432:5432
55+ env :
56+ SFTKIT_TEST_DB_USER : " sftkit"
57+ SFTKIT_TEST_DB_HOST : " localhost"
58+ SFTKIT_TEST_DB_PORT : " 5432"
59+ SFTKIT_TEST_DB_DBNAME : " sftkit_test"
60+ SFTKIT_TEST_DB_PASSWORD : " password"
3661 steps :
3762 - uses : actions/checkout@v4
3863
@@ -49,13 +74,34 @@ jobs:
4974 - name : Set up Python with PDM
5075 uses : pdm-project/setup-pdm@v3
5176 with :
52- python-version : " 3.11 "
77+ python-version : ${{ matrix.python-version }}
5378
5479 - name : Install Python dependencies
5580 run : pdm sync -d
5681
5782 - name : Test
58- run : npx nx run-many --target=test
83+ run : npx nx run-many --target=test --projects=tag:lang:python
84+
85+ test-js :
86+ runs-on : ubuntu-latest
87+ strategy :
88+ matrix :
89+ node-version : [ 20 ]
90+ steps :
91+ - uses : actions/checkout@v4
92+
93+ - name : Set up Nodejs
94+ uses : actions/setup-node@v4
95+ with :
96+ node-version : ${{ matrix.node-version}}
97+ cache : " npm"
98+ cache-dependency-path : package-lock.json
99+
100+ - name : Install node dependencies
101+ run : npm ci
102+
103+ - name : Test
104+ run : npx nx run-many --target=test --projects=tag:lang:javascript
59105
60106 build :
61107 runs-on : ubuntu-latest
0 commit comments