Skip to content

Commit

Permalink
feat(ci): separate metadata-ingestion into a separate workflow (#2828)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Jul 3, 2021
1 parent 6ef0bf0 commit 1b47885
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ jobs:
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel: github-activities

metadata-ingestion:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: ./metadata-ingestion/scripts/install_deps.sh
- name: Run metadata-ingestion tests
run: ./gradlew :metadata-ingestion:testFull -x :metadata-ingestion:codegen

smoke-test:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -82,4 +94,4 @@ jobs:
with:
python-version: "3.6"
- name: Quickstart Compose Validation
run: ./docker/quickstart/generate_and_compare.sh
run: ./docker/quickstart/generate_and_compare.sh
9 changes: 7 additions & 2 deletions metadata-ingestion/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,19 @@ task lintFix(type: Exec, dependsOn: installDev) {
"mypy src/ tests/"
}

task test(type: Exec, dependsOn: installDev) {
task testQuick(type: Exec, dependsOn: installDev) {
// We can't enforce the coverage requirements if we run a subset of the tests.
commandLine 'bash', '-x', '-c',
"source ${venv_name}/bin/activate && pytest -m 'not slow' -vv --cov-fail-under 0"
}
task testFull(type: Exec, dependsOn: installDev) {
commandLine 'bash', '-x', '-c',
"source ${venv_name}/bin/activate && pytest -vv"
}

build.dependsOn install
check.dependsOn lint
check.dependsOn test
check.dependsOn testQuick

clean {
delete venv_name
Expand Down

0 comments on commit 1b47885

Please sign in to comment.