run tests as non-root user... #28
This file contains 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: run-the-tests | |
on: [push, pull_request] | |
jobs: | |
tests: | |
timeout-minutes: 20 | |
name: ${{ matrix.python }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./docker-testing | |
strategy: | |
matrix: | |
# python: ['2.7','3.4','3.6','3.7','3.8','3.9','3.10','3.11','3.12'] | |
# python: ['2.7','3.4'] | |
python: ['3.6'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Start containers | |
run: ./start_containers.sh "${{ matrix.python }}" | |
- name: run test | |
run: | | |
while :; do | |
client_container=$(docker ps --format "{{.Names}}"|grep python.client) | |
[ -n "$client_container" ] && break | |
sleep 1 | |
done | |
echo "client_container = [$client_container]" | |
docker exec "${client_container}" /repo_root/docker-testing/run_tests.sh | |
- name: Stop containers | |
if: always() | |
run: docker compose -f harness-docker-compose.yml down |