-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.05 KB
/
ci-dev.yaml
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
name: Test, Lint and Format
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
env:
PIP_CACHE_DIR: ${{ github.workspace }}/.cache/pip
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up Python environment
run: |
pip install poetry
poetry install
mkdir envs
touch envs/.env.tests
echo "NOVA_HOST=test.instance.mock.io" > envs/.env.tests
echo "CELL_ID=cell" >> envs/.env.tests
echo "MOTION_GROUP=virtual-robot" >> envs/.env.tests
echo "TCP=Flange" >> envs/.env.tests
- name: Check formatting with ruff
run: poetry run ruff format --check .
- name: Check ruff for linting
run: poetry run ruff check .
- name: Run tests
run: |
cp envs/.env.tests envs/test_.env.tests
PYTHONPATH=. poetry run pytest -rs -v