name: Linux # Run on PR requests. And on master itself. on: push: branches: - main pull_request: jobs: test: name: Test, Linux, Python ${{ matrix.python }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: # 2019 - python: 3.8 pins: "" # 2021 - python: 3.9 pins: "" # 2022 - python: "3.10" pins: "" # current - python: "3.11" pins: "" services: postgres: image: postgres:14-alpine env: POSTGRES_PASSWORD: postgres ports: - 5432:5432 s3: image: minio/minio:edge-cicd env: MINIO_DOMAIN: localhost # virtual hosted-style access MINIO_ROOT_USER: cleanpython MINIO_ROOT_PASSWORD: cleanpython ports: - 9000:9000 steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - name: Install python dependencies run: | pip install --disable-pip-version-check --upgrade pip setuptools pip install -e .[dramatiq,fastapi,auth,celery,fluentbit,sql,s3,api_client,amqp,test] ${{ matrix.pins }} pip list - name: Run tests run: pytest tests --cov - name: Wait for postgres run: scripts/wait-for-postgres.sh env: POSTGRES_URL: 'postgres:postgres@localhost:5432' timeout-minutes: 1 - name: Run integration tests run: pytest integration_tests env: POSTGRES_URL: 'postgres:postgres@localhost:5432' S3_URL: 'http://localhost:9000'