Skip to content

Bump default timeout from 10 to 60 #24

Bump default timeout from 10 to 60

Bump default timeout from 10 to 60 #24

Workflow file for this run

---
name: "Run Unit Tests"
on:
pull_request:
branches:
- main
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: ${{ matrix.python-version }}
- name: "Setup environment"
run: |
pipx install poetry
- name: "Install dependencies"
run: |
poetry install --no-ansi --no-root
- name: "Run Pytest"
run: |
poetry run pytest
# Staging this for when we integrate pyplayright into our demo repos
# integration-tests:
# runs-on: ubuntu-latest
# needs: unit-tests
# strategy:
# matrix:
# # Latest 1.0.x release, stable release, and latest release
# infrahub-version: ["1.0", stable, latest]
# steps:
# - name: "Check out repository code"
# uses: "actions/checkout@v4"
# - name: "Set up Python"
# uses: "actions/setup-python@v5"
# with:
# python-version: "3.12"
# - name: "Setup environment"
# run: |
# pipx install poetry
# - name: "Install dependencies"
# run: |
# poetry install --no-ansi --no-root
# - name: "Launch Infrahub"
# run: |
# curl https://infrahub.opsmill.io | VERSION=${{ matrix.infrahub-version }} docker compose -f - up -d
# - name: "Wait for Infrahub to become accessible"
# run: |
# timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8000/)" != "200" ]]; do echo "waiting for Infrahub"; sleep 5; done' || false
# - name: "Run Pytest"
# run: |
# poetry run pytest