From 32eb30f13bf2d99a421b4209f34c4b192cf3c1b6 Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Fri, 2 Jul 2021 16:44:34 -0700 Subject: [PATCH 1/2] build: separate metadata-ingestion into a separate workflow --- .github/workflows/build-and-test.yml | 14 +++++++++++++- metadata-ingestion/build.gradle | 11 ++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 9028f3634d769..44e9a295714d9 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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: @@ -82,4 +94,4 @@ jobs: with: python-version: "3.6" - name: Quickstart Compose Validation - run: ./docker/quickstart/generate_and_compare.sh \ No newline at end of file + run: ./docker/quickstart/generate_and_compare.sh diff --git a/metadata-ingestion/build.gradle b/metadata-ingestion/build.gradle index bf42c10c6a914..09f4c97aff7e2 100644 --- a/metadata-ingestion/build.gradle +++ b/metadata-ingestion/build.gradle @@ -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 -vv" + '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 From 7dad6478f450a99ee3ff6834ed4b711c6a15e4c1 Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Fri, 2 Jul 2021 16:57:57 -0700 Subject: [PATCH 2/2] fix gradle quoting --- metadata-ingestion/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata-ingestion/build.gradle b/metadata-ingestion/build.gradle index 09f4c97aff7e2..acc1a1568f32d 100644 --- a/metadata-ingestion/build.gradle +++ b/metadata-ingestion/build.gradle @@ -44,11 +44,11 @@ task lintFix(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' + "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' + "source ${venv_name}/bin/activate && pytest -vv" } build.dependsOn install