Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
5594eae6
"docs/vscode:/vscode.git/clone" did not exist on "ed41db8525b8a7d48fe130fe610da98e8a53d3b0"
Unverified
Commit
5594eae6
authored
Nov 02, 2021
by
moto
Committed by
GitHub
Nov 02, 2021
Browse files
Run integration tests on CI (#1939)
parent
3c021f1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
0 deletions
+55
-0
.github/workflows/integration-test.yml
.github/workflows/integration-test.yml
+33
-0
test/integration_tests/conftest.py
test/integration_tests/conftest.py
+22
-0
No files found.
.github/workflows/integration-test.yml
0 → 100644
View file @
5594eae6
name
:
Integration Test
on
:
pull_request
:
branches
:
[
main
]
workflow_dispatch
:
jobs
:
build
:
runs-on
:
ubuntu-latest
strategy
:
fail-fast
:
false
matrix
:
python-version
:
[
3.8
]
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v2
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Install packages
run
:
|
python -m pip install --quiet --upgrade pip
python -m pip install --quiet --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
python -m pip install --quiet pytest requests cmake ninja deep-phonemizer
git submodule update --init --recursive
python setup.py install
-
name
:
Run integration test
run
:
|
cd test && pytest integration_tests -v --use-tmp-hub-dir
test/integration_tests/conftest.py
View file @
5594eae6
...
...
@@ -55,3 +55,25 @@ def sample_speech(tmp_path, lang):
resp
.
raise_for_status
()
file
.
write
(
resp
.
content
)
return
path
def
pytest_addoption
(
parser
):
parser
.
addoption
(
"--use-tmp-hub-dir"
,
action
=
"store_true"
,
help
=
(
"When provided, tests will use temporary directory as Torch Hub directory. "
"Downloaded models will be deleted after each test."
)
)
@
pytest
.
fixture
(
autouse
=
True
)
def
temp_hub_dir
(
tmpdir
,
pytestconfig
):
if
not
pytestconfig
.
getoption
(
'use_tmp_hub_dir'
):
yield
else
:
org_dir
=
torch
.
hub
.
get_dir
()
torch
.
hub
.
set_dir
(
tmpdir
)
yield
torch
.
hub
.
set_dir
(
org_dir
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment