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

Cache assets directory #12

Merged
merged 1 commit into from
Mar 23, 2024
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
8 changes: 8 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ stages:
path: $(pip_cache_dir)
displayName: Cache pip installs

- task: Cache@2
inputs:
key: 'assets | "$(Agent.OS)"'
restoreKeys: |
assets | "$(Agent.OS)"
path: ./assets
displayName: Cache assets directory

- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
Expand Down
6 changes: 2 additions & 4 deletions tests/tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import unittest
import os
import time
from shutil import rmtree
from selenium.webdriver import ChromeOptions, ChromeService, Chrome
import c4t

Expand All @@ -18,7 +17,6 @@ class _TestData:
@classmethod
def setUpClass(cls) -> None:
cls.assets_dir = './assets'
rmtree(cls.assets_dir) if os.path.exists(cls.assets_dir) else None
cls.chrome_options = ChromeOptions()
cls.chrome_options.binary_location = c4t.location.chrome
cls.chrome_options.add_argument('--no-sandbox')
Expand All @@ -35,8 +33,8 @@ def tearDown(self) -> None:

@classmethod
def tearDownClass(cls) -> None:
rmtree(cls.assets_dir) if os.path.exists(cls.assets_dir) else None

pass
def verify_chrome_for_testing_version_with_selenium(
self, expected_version: str
):
Expand Down