|
| 1 | +name: Test Python future version |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: # Manual trigger. |
| 5 | + schedule: |
| 6 | + - cron: '1 3 * * 1-5' # Every Monday to Friday at 03:01 AM. |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + |
| 11 | +jobs: |
| 12 | + test: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + container: |
| 15 | + image: ghcr.io/pvital/pvital-python:latest |
| 16 | + services: |
| 17 | + postgres: |
| 18 | + image: public.ecr.aws/docker/library/postgres:16.10-trixie |
| 19 | + env: |
| 20 | + POSTGRES_USER: root |
| 21 | + POSTGRES_PASSWORD: passw0rd |
| 22 | + POSTGRES_DB: instana_test_db |
| 23 | + mariadb: |
| 24 | + image: public.ecr.aws/docker/library/mariadb:11.3.2 |
| 25 | + env: |
| 26 | + MYSQL_ROOT_PASSWORD: passw0rd |
| 27 | + MYSQL_DATABASE: instana_test_db |
| 28 | + redis: |
| 29 | + image: public.ecr.aws/docker/library/redis:7.2.4-bookworm |
| 30 | + rabbitmq: |
| 31 | + image: public.ecr.aws/docker/library/rabbitmq:3.13.0 |
| 32 | + mongo: |
| 33 | + image: public.ecr.aws/docker/library/mongo:7.0.6 |
| 34 | + gcloud-pubsub: |
| 35 | + image: quay.io/thekevjames/gcloud-pubsub-emulator:latest |
| 36 | + env: |
| 37 | + PUBSUB_EMULATOR_HOST: 0.0.0.0:8681 |
| 38 | + PUBSUB_PROJECT1: test-project,test-topic |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v5 |
| 41 | + #- name: Set up Python 3.15.0 |
| 42 | + # uses: actions/setup-python@v5 |
| 43 | + # with: |
| 44 | + # python-version: 3.15.0-alpha.7 |
| 45 | + - name: Display Python version |
| 46 | + run: python -c "import sys; print(sys.version)" |
| 47 | + - name: Install Python dependencies |
| 48 | + run: | |
| 49 | + cp -a /root/base/venv ./venv |
| 50 | + . venv/bin/activate |
| 51 | + python -m pip install --upgrade pip |
| 52 | + pip install -r requirements.txt |
| 53 | + #- name: Install Python test dependencies |
| 54 | + # run: | |
| 55 | + # pip install -r tests/requirements-pre315.txt |
| 56 | + - name: Test with pytest |
| 57 | + run: | |
| 58 | + . venv/bin/activate |
| 59 | + pytest -v --junitxml=output_file.xml tests | tee pytest.log |
| 60 | + - uses: actions/upload-artifact@v4 |
| 61 | + with: |
| 62 | + name: python_next_test_results |
| 63 | + path: | |
| 64 | + output_file.xml |
| 65 | + pytest.log |
| 66 | + overwrite: true |
| 67 | + |
0 commit comments