-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (44 loc) · 1.29 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: CI
on:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
branches: [ main ]
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
services:
neo4j:
image: neo4j:5
ports:
- 7687:7687 # Bolt port
- 7474:7474 # HTTP port
env:
NEO4J_AUTH: neo4j:${{ secrets.NEO4J_PASSWORD }}
options: >-
--health-cmd="curl -f http://localhost:7474 || exit 1"
--health-interval=10s
--health-timeout=5s
--health-retries=5
strategy:
matrix:
python-version: [ 3.12 ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v9
- name: Install dependencies
run: poetry install
- name: Run pre-commit hooks
run: poetry run pre-commit run --all-files --show-diff-on-failure
- name: Run tests
env:
NEO4J_URI: bolt://localhost:7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: ${{ secrets.NEO4J_PASSWORD }}
run: poetry run pytest