Skip to content

Commit c53f965

Browse files
committed
ci: run tests on push, pr
1 parent 3353573 commit c53f965

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/tests.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: tests
2+
3+
on: [push]
4+
5+
jobs:
6+
build_and_test:
7+
runs-on: ubuntu-latest
8+
services:
9+
typesense:
10+
image: typesense/typesense:26.0
11+
ports:
12+
- 8108:8108/tcp
13+
volumes:
14+
- /tmp/typesense-server-data:/data
15+
env:
16+
TYPESENSE_DATA_DIR: /data
17+
TYPESENSE_API_KEY: xyz
18+
TYPESENSE_ENABLE_CORS: true
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: php-actions/composer@v6
22+
- run: vendor/bin/phpunit

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@
5656
"preferred-install": {
5757
"*": "dist"
5858
},
59-
"sort-packages": true
59+
"allow-plugins": {
60+
"php-http/discovery": true
61+
}
6062
},
6163
"scripts": {
6264
"typesenseServer": [

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</testsuites>
1111

1212
<php>
13-
<env name="TYPESENSE_NODE_HOST" value="host.docker.internal" />
13+
<env name="TYPESENSE_NODE_HOST" value="localhost" />
1414
<env name="TYPESENSE_NODE_PORT" value="8108" />
1515
<env name="TYPESENSE_NODE_PROTOCOL" value="http" />
1616
<env name="TYPESENSE_API_KEY" value="xyz" />

0 commit comments

Comments
 (0)