Skip to content

Commit

Permalink
reverts unit test structure and test_and_lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mekhlakapoor committed Jul 31, 2024
1 parent bcbc882 commit 36ea0c9
Show file tree
Hide file tree
Showing 78 changed files with 47 additions and 40 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run integration tests

on:
push:
branches:
- feat-53-integration-testing

jobs:
integration_tests:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
AWS_METADATA_MAPPER_ROLE: ${{ secrets.AWS_METADATA_MAPPER_ROLE_DEV }}
AWS_METADATA_MAPPER_BUCKET: ${{ vars.AWS_METADATA_MAPPER_BUCKET_DEV }}
AWS_REGION: ${{ vars.AWS_REGION_DEV }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install -e .[all]
python -m pip install s3fs
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.AWS_METADATA_MAPPER_ROLE }}
role-session-name: github-integration-test-session
aws-region: ${{ env.AWS_REGION }}
- name: run integration tests
run:
python -m tests.integration.test_bergamo.test_session AWS_METADATA_MAPPER_BUCKET=${{ secrets.AWS_METADATA_MAPPER_BUCKET_DEV }}





37 changes: 2 additions & 35 deletions .github/workflows/test_and_lint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Lint and run tests

on:
push:
pull_request:
branches:
- feat-53-integration-testing
- main

jobs:
ci:
Expand All @@ -24,36 +24,3 @@ jobs:
run: flake8 . && interrogate --verbose .
- name: Run tests and coverage
run: coverage run -m unittest discover && coverage report
integration_tests:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
AWS_METADATA_MAPPER_ROLE: ${{ secrets.AWS_METADATA_MAPPER_ROLE_DEV }}
AWS_METADATA_MAPPER_BUCKET: ${{ vars.AWS_METADATA_MAPPER_BUCKET_DEV }}
AWS_REGION: ${{ vars.AWS_REGION_DEV }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install -e .[all]
python -m pip install s3fs
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.AWS_METADATA_MAPPER_ROLE }}
role-session-name: github-integration-test-session
aws-region: ${{ env.AWS_REGION }}
- name: run integration tests
run:
python -m tests.integration.test_bergamo.test_session AWS_METADATA_MAPPER_BUCKET=${{ secrets.AWS_METADATA_MAPPER_BUCKET_DEV }}





File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from aind_metadata_mapper.dynamic_routing.mvr_rig import ( # type: ignore
MvrRigEtl,
)
from tests.unit.test_dynamic_routing import test_utils as test_utils
from tests.test_dynamic_routing import test_utils as test_utils

RESOURCES_DIR = (
Path(os.path.dirname(os.path.realpath(__file__)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from aind_metadata_mapper.dynamic_routing.sync_rig import ( # type: ignore
SyncRigEtl,
)
from tests.unit.test_dynamic_routing import test_utils as test_utils
from tests.test_dynamic_routing import test_utils as test_utils

RESOURCES_DIR = (
Path(os.path.dirname(os.path.realpath(__file__)))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
JobSettings,
SmartspimETL,
)
from tests.unit.test_smartspim.example_metadata import (
from tests.test_smartspim.example_metadata import (
example_filter_mapping,
example_metadata_info,
example_processing_manifest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from aind_data_schema.components.coordinates import AnatomicalDirection

from aind_metadata_mapper.smartspim import utils
from tests.unit.test_smartspim.example_metadata import (
from tests.test_smartspim.example_metadata import (
example_filter_mapping,
example_metadata_info,
)
Expand Down
1 change: 0 additions & 1 deletion tests/unit/__init__.py

This file was deleted.

0 comments on commit 36ea0c9

Please sign in to comment.