Skip to content

Maint: python version, CI/CD, tiled dependency #470

Maint: python version, CI/CD, tiled dependency

Maint: python version, CI/CD, tiled dependency #470

Workflow file for this run

name: tests
on:
push:
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
unit-tests:

Check failure on line 14 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 14
runs-on: ubuntu-latest
- uses: actions/checkout@v4
- name: Download and build bluesky-pods
run: |
docker pull ghcr.io/bluesky/bluesky-pods-bluesky:main
docker tag ghcr.io/bluesky/bluesky-pods-bluesky:main bluesky:latest
- name: Start Bluesky containers
run: |
pushd bluesky_adaptive/tests/podman
docker-compose up -d
popd
- name: Log which containers are running
run: docker ps -a
- name: Check container status and fetch logs if any failed
run: |
failed_containers=()
while read -r container; do
status=$(docker inspect --format='{{.State.Status}}' "$container")
if [ "$status" != "running" ]; then
echo "::error ::Container $container has status $status"
failed_containers+=("$container")
fi
done < <(docker ps -aq)
for container in "${failed_containers[@]}"; do
echo "Logs for $container:"
docker logs "$container"
done
if [ ${#failed_containers[@]} -ne 0 ]; then
echo "::error ::Some containers failed to start"
docker ps -a
exit 1
fi
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install
# shell: bash -l {0}
# run: |
# set -vxeuo pipefail
# pip install --upgrade pip wheel
# pip install .
# pip install -r requirements-dev.txt
# pip install -r requirements-agents.txt
# mkdir -p /home/runner/.config/tiled/profiles
# cp ./bluesky_adaptive/tests/podman/tiled_client_config.yml /home/runner/.config/tiled/profiles/tiled_client_config.yml
# pip list
- name: Reload Permissions for QServer (Ensures plans are available)
shell: bash -l {0}
run: |
set -vxeuo pipefail
qserver environment open
qserver permissions reload
- name: Setup and Test Python Versions
run: |
for version in 3.11 3.12; do
echo "Setting up Python $version"
sudo apt-get install -y python$version python$version-venv
python$version -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install .
pip install -r requirements-dev.txt
pip install -r requirements-agents.txt
mkdir -p /home/runner/.config/tiled/profiles
cp ./bluesky_adaptive/tests/podman/tiled_client_config.yml /home/runner/.config/tiled/profiles/tiled_client_config.yml
pip list
echo "Running tests with Python $version"
coverage run -m pytest -v
coverage report
deactivate
rm -rf venv
done
# - name: Test with pytest
# shell: bash -l {0}
# run: |
# set -vxeuo pipefail
# coverage run -m pytest -v
# coverage report