forked from bluesky/bluesky-httpserver
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.68 KB
/
Copy pathtesting.yml
File metadata and controls
55 lines (46 loc) · 1.68 KB
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
53
54
55
name: Unit Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-env: ["py311", "py312", "py313", "py314"]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Need this to get version number from last tag
fetch-depth: 0
- uses: shogo82148/actions-setup-redis@v1
with:
redis-version: "7.x"
- uses: prefix-dev/setup-pixi@v0.10.0
- name: Install dependencies
run: |
pixi install --environment=${{ matrix.python-env }}
pixi list --environment=${{ matrix.python-env }}
pixi run --environment=${{ matrix.python-env }} pip list
pixi run --environment=${{ matrix.python-env }} conda list
- name: Start LDAP
run: |
# Start LDAP
bash continuous_integration/scripts/start_LDAP.sh
- name: Test with pytest
env:
PYTEST_ADDOPTS: "--durations=20"
run: |
pixi run --environment=${{ matrix.python-env }} coverage run -m pytest -vv
pixi run --environment=${{ matrix.python-env }} coverage report -m
- name: Dump LDAP diagnostics on failure
if: failure()
run: |
docker ps
docker compose -f continuous_integration/docker-configs/ldap-docker-compose.yml ps
LDAP_CONTAINER_ID=$(docker compose -f continuous_integration/docker-configs/ldap-docker-compose.yml ps -q openldap | tr -d '[:space:]')
if [ -n "$LDAP_CONTAINER_ID" ]; then
docker logs --tail 200 "$LDAP_CONTAINER_ID"
else
docker compose -f continuous_integration/docker-configs/ldap-docker-compose.yml logs --tail 200 openldap
fi