test (core) : adding TestMinIORootAdapter #107
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: Pytest | |
env: | |
POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }} | |
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
POSTGRES_USER: ${{ secrets.POSTGRES_USER }} | |
POSTGRES_DATABASE: ${{ secrets.POSTGRES_DATABASE }} | |
APPLY_MIGRATIONS: ${{ secrets.APPLY_MIGRATIONS }} | |
ALEMBIC_CONFIG: ${{ secrets.ALEMBIC_CONFIG }} | |
MONGODB_HOST: ${{ secrets.MONGODB_HOST }} | |
MONGODB_USERNAME: ${{ secrets.MONGODB_USERNAME }} | |
MONGODB_PASSWORD: ${{ secrets.MONGODB_PASSWORD }} | |
MINIO_HOST: ${{ secrets.MINIO_HOST }} | |
MINIO_PORT: ${{ secrets.MINIO_PORT }} | |
MINIO_SECURE: ${{ secrets.MINIO_SECURE }} | |
MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }} | |
MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }} | |
MINIO_APP_USER_ACCESS_KEY: ${{ secrets.MINIO_APP_USER_ACCESS_KEY }} | |
MINIO_APP_USER_SECRET_KEY: ${{ secrets.MINIO_APP_USER_SECRET_KEY }} | |
MINIO_BUCKET_NAME: ${{ secrets.MINIO_BUCKET_NAME }} | |
on: [push] | |
jobs: | |
run_pytest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8"] | |
services: | |
minio: | |
image: minio/minio:edge-cicd | |
ports: | |
- 9000:9000 | |
env: | |
MINIO_ROOT_USER: personifydev | |
MINIO_ROOT_PASSWORD: testenv123 | |
options: --health-cmd "curl -s http://localhost:9000/minio/health/live" | |
postgres-db: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: testenv123 | |
POSTGRES_USER: personifydev | |
POSTGRES_DB: personify | |
ports: | |
- 5432:5432 | |
mongo-db: | |
image: mongo | |
env: | |
MONGO_INITDB_ROOT_USERNAME: personifydev | |
MONGO_INITDB_ROOT_PASSWORD: testenv123 | |
ports: | |
- 27017:27017 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python Version | |
run: python -c "import sys; print(sys.version)" | |
- name: Updrade Pip | |
run: python -m pip install --upgrade pip | |
- name: Install Requirements | |
run: pip install -r requirements.txt | |
- name: Install required packages along with Pytest | |
run: pip install pytest pytest-cov pytest-asyncio pytest-dotenv | |
- name: Running tests with Code Coverage | |
run: pytest -vv --junitxml=coverage.xml --cov --cov-report=term-missing | |
- name: Coveralls | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel: true | |
flag-name: Running tests with Code Coverage | |
coveralls_finish: | |
needs: run_pytest | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel-finished: true | |
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
path-to-lcov: coverage.xml |