diff --git a/.github/workflows/test_django_api.yaml b/.github/workflows/test_django_api.yaml deleted file mode 100644 index db407da..0000000 --- a/.github/workflows/test_django_api.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: Test Database Tool -on: - pull_request: - types: - - opened - - synchronize - - reopened - -jobs: - build: - runs-on: ubuntu-latest - - services: - postgres: - image: postgres:latest - env: - POSTGRES_DB: ${{secrets.DB_NAME}} - POSTGRES_USER: ${{secrets.DB_USER}} - POSTGRES_PASSWORD: ${{secrets.DB_PASSWORD}} - ports: - - 5432:5432 - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.x - - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - pip install . -r requirements.txt - - - name: Run Django Model Tests - env: - DB_PASSWORD: ${{secrets.DB_PASSWORD}} - run: python ./src/evagram/website/backend/manage.py test api diff --git a/.github/workflows/test_evagram_input.yaml b/.github/workflows/test_evagram_input.yaml index 8b39043..6577a2f 100644 --- a/.github/workflows/test_evagram_input.yaml +++ b/.github/workflows/test_evagram_input.yaml @@ -34,11 +34,17 @@ jobs: - name: Install Evagram Input Module run: | python -m pip install --upgrade pip - pip install evagram_input@git+https://github.com/GEOS-ESM/evagram_input@feature/input_tool --upgrade + pip install evagram_input@git+https://github.com/GEOS-ESM/evagram_input --upgrade - name: Install Dependencies run: pip install . -r requirements.txt + - name: Create PGPASS File + run: | + echo 127.0.0.1:5432:test_evagram:postgres:${{secrets.DB_PASSWORD}} >> ~/.pgpass + chmod 600 ~/.pgpass + export PGPASSFILE='/home/runner/.pgpass' + - name: Run Evagram Input Tests run: python src/evagram/website/backend/manage.py test input_app.test_input_tool env: diff --git a/pycodestyle.cfg b/pycodestyle.cfg index db4875f..c874899 100644 --- a/pycodestyle.cfg +++ b/pycodestyle.cfg @@ -9,4 +9,4 @@ max-line-length = 100 indent-size = 4 statistics = True ignore = W503, W504 -exclude = __pycache__, src/evagram/website/backend/api/migrations +exclude = __pycache__, src/evagram/website/backend/api/migrations, src/evagram/website/frontend/node_modules diff --git a/src/evagram/website/backend/input_app/test_input_tool.py b/src/evagram/website/backend/input_app/test_input_tool.py index 0cf48a6..4d7149d 100644 --- a/src/evagram/website/backend/input_app/test_input_tool.py +++ b/src/evagram/website/backend/input_app/test_input_tool.py @@ -27,8 +27,7 @@ def test_ExperimentPathNotFound(self): def test_RollbackOnException(self): with self.assertRaises(Exception): - input_data( - owner="postgres", experiment="bad_experiment", eva_directory="tests/dummy") + input_data(owner="postgres", experiment="bad_experiment", eva_directory="tests/dummy") owner = Owners.objects.get(username="postgres") experiments = Experiments.objects.filter(experiment_name="bad_experiment", owner=owner)