feat(ci): separate metadata-ingestion into a separate workflow (#2828)

This commit is contained in:
Harshal Sheth 2021-07-02 20:26:00 -07:00 committed by GitHub
parent 6ef0bf0dfd
commit 1b4788537d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 3 deletions

View File

@ -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:

View File

@ -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