Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: separate metadata-ingestion into a separate workflow #2828

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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