Skip to content

Commit

Permalink
Merge pull request #45 from beeldengeluid/adopt-reusable-workflows
Browse files Browse the repository at this point in the history
Adopt reusable workflows
  • Loading branch information
gb-beng authored Jul 25, 2024
2 parents b85a3d4 + 381f632 commit 0b7fa46
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 92 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/_test.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Deploy dane-whisper-asr-worker to ghcr
name: Build & Push

on:
workflow_call:
push:
branches:
- main
workflow_dispatch:

jobs:
build-push-image:
Expand All @@ -10,4 +13,4 @@ jobs:
permissions:
contents: read
packages: write
id-token: write
id-token: write
22 changes: 0 additions & 22 deletions .github/workflows/main-branch.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/manual-deploy.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/not-main-branch.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Check project

on:
push:

jobs:
check-project:
uses: beeldengeluid/gha-workflows/.github/workflows/check-poetry-project.yml@dd25210e68fdf86f4df924850cdfcfc91931faf3
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ testpaths = [
]
addopts = [
"--cov",
"-m not data_dependent and not legacy",
]
markers = [
"data_dependent: depends on data",
"legacy: marks tests as legacy - includes audio processing (deselect with '-m \"not legacy\"')",
"serial",
]
Expand Down
1 change: 1 addition & 0 deletions tests/unit/data_handling_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pytest


@pytest.mark.data_dependent
@pytest.mark.parametrize("audio_too", [True, False])
def test_batches(audio_too):
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/feature_extraction_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def load_model(request):
yield (model, config_file)


@pytest.mark.data_dependent
@pytest.mark.parametrize("load_model", ["Visualnet"], indirect=True)
def test_extract_features(load_model):
feature_file = get_output_file_path(UNIT_TEST_SOURCE_ID, OutputType.FEATURES)
Expand Down Expand Up @@ -62,6 +63,7 @@ def test_extract_features(load_model):


@pytest.mark.legacy
@pytest.mark.data_dependent
@pytest.mark.parametrize("load_model", ["AVNet"], indirect=True)
def test_extract_features_legacy(load_model):
feature_file = get_output_file_path(UNIT_TEST_SOURCE_ID, OutputType.FEATURES)
Expand Down

0 comments on commit 0b7fa46

Please sign in to comment.