Skip to content

Add a test for editing Hostingprovider #1292

Add a test for editing Hostingprovider

Add a test for editing Hostingprovider #1292

Workflow file for this run

name: Run tests
on: [push]
defaults:
run:
working-directory: ./
jobs:
run_tests:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.3
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: just-for-github-actions
MYSQL_DATABASE: greencheck
# rabbitmq
rabbitmq:
image: rabbitmq:3.8
env:
RABBITMQ_USERNAME: "guest"
RABBITMQ_PASSWORD: "guest"
ports:
- 5672:5672
options: '--hostname "rmq" --health-cmd "rabbitmqctl status" --health-interval 10s --health-timeout 10s --health-retries 3 --health-start-period 60s'
# redis
redis:
image: redis:latest
ports:
- 6379:6379
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pipenv and wheel for managing dependencies
run: |
python -m pip install --upgrade pipenv wheel
- name: Set up a cache-key for installations of dependencies, in .venv
id: cache-pipenv
uses: actions/cache@v3
with:
path: ./.venv
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
- name: Install dependencies
# skipping this check to see if we have a collision between cache keys
# when deploying versus running tests
# if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
pipenv install --deploy --dev --verbose
- name: Run tests
run: |
pipenv run pytest
env:
PIPENV_DOTENV_LOCATION: .env.test
DOMAIN_SNAPSHOT_BUCKET: ${{ secrets.TESTING_DOMAIN_SNAPSHOT_BUCKET }}
DATABASE_URL_READ_ONLY: ${{ secrets.TESTING_DATABASE_URL_READ_ONLY }}
OBJECT_STORAGE_ACCESS_KEY_ID: ${{ secrets.TESTING_OBJECT_STORAGE_ACCESS_KEY_ID }}
OBJECT_STORAGE_SECRET_ACCESS_KEY: ${{ secrets.TESTING_OBJECT_STORAGE_SECRET_ACCESS_KEY }}
OBJECT_STORAGE_ENDPOINT: ${{ secrets.TESTING_OBJECT_STORAGE_ENDPOINT }}
OBJECT_STORAGE_REGION: ${{ secrets.TESTING_OBJECT_STORAGE_REGION }}
OBJECT_STORAGE_BUCKET_NAME: ${{ secrets.TESTING_OBJECT_STORAGE_BUCKET_NAME }}
AMAZON_PROVIDER_ID: ${{ secrets.AMAZON_PROVIDER_ID }}
AMAZON_REMOTE_API_ENDPOINT: ${{ secrets.AMAZON_REMOTE_API_ENDPOINT }}
MICROSOFT_PROVIDER_ID: ${{ secrets.MICROSOFT_PROVIDER_ID }}
MICROSOFT_LOCAL_FILE_DIRECTORY: ${{ secrets.MICROSOFT_LOCAL_FILE_DIRECTORY }}
EQUINIX_PROVIDER_ID: ${{ secrets.EQUINIX_PROVIDER_ID }}
EQUINIX_REMOTE_API_ENDPOINT: ${{ secrets.EQUINIX_REMOTE_API_ENDPOINT }}
AWS_SHARED_CREDENTIALS_FILE: ${{ secrets.AWS_SHARED_CREDENTIALS_FILE }}
AWS_CONFIG_FILE: ${{ secrets.AWS_CONFIG_FILE }}