-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (35 loc) · 1.46 KB
/
check_on_push.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
# This is a basic workflow to help you run linting and test upon pushing to github or making PRs
name: linting
# Triggers the workflow on push or pull request
on: [push, pull_request ]
# Jobs can run in parallel
jobs:
build-n-lint:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.10.6' # Version range or exact version
architecture: 'x64' # optional x64 or x86.
- name: install packages
run: pip3 install -r requirements.txt
- name: Run linter
run: pylint --rcfile=.pylintrc app/*.py app/tests/*.py app/core/*/*.py
build-n-test:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.10.6' # Version range or exact version
architecture: 'x64' # optional x64 or x86.
- name: install packages
run: pip3 install -r requirements.txt
- name: start pgvector docker
run: docker run -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=secret -e POSTGRES_DB=adotbcollection -p 5432:5432 --detach ankane/pgvector
- name: Run Pytest
working-directory: ./app
run: python3 -m pytest -s tests/test_basics.py tests/test_dataupload.py