Repository navigation
Merge pull request #95 from dmgav/package-updates #138
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |