Merge pull request #1145 from firesim/ci-remove-python-filter
ci: don't filter out python tests
This commit is contained in:
commit
3a0ff08122
|
@ -37,7 +37,6 @@ jobs:
|
|||
# Queried by downstream jobs to determine if they should run.
|
||||
outputs:
|
||||
needs-manager: ${{ steps.filter.outputs.all_count != steps.filter.outputs.skip-manager_count }}
|
||||
needs-manager-python-only: ${{ steps.filter.outputs.python-manager }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -60,14 +59,6 @@ jobs:
|
|||
- '**/.gitignore'
|
||||
- '.github/ISSUE_TEMPLATE/**'
|
||||
|
||||
# Python-specific manager filter
|
||||
python-manager:
|
||||
- 'deploy/firesim'
|
||||
- 'deploy/awstools/**'
|
||||
- 'deploy/buildtools/**'
|
||||
- 'deploy/runtools/**'
|
||||
- 'deploy/util/**'
|
||||
|
||||
setup-self-hosted-manager:
|
||||
name: setup-self-hosted-manager
|
||||
needs: change-filters
|
||||
|
@ -123,8 +114,7 @@ jobs:
|
|||
|
||||
run-manager-pytests:
|
||||
name: run-manager-pytests
|
||||
needs: [setup-manager, change-filters]
|
||||
if: needs.change-filters.outputs.needs-manager-python-only == 'true'
|
||||
needs: [setup-manager]
|
||||
runs-on: ${{ github.run_id }}
|
||||
env:
|
||||
TERM: xterm-256-color
|
||||
|
@ -135,8 +125,7 @@ jobs:
|
|||
|
||||
run-python-typecheck:
|
||||
name: run-python-typecheck
|
||||
needs: [setup-manager, change-filters]
|
||||
if: needs.change-filters.outputs.needs-manager-python-only == 'true'
|
||||
needs: [setup-manager]
|
||||
runs-on: ${{ github.run_id }}
|
||||
env:
|
||||
TERM: xterm-256-color
|
||||
|
|
|
@ -100,6 +100,7 @@ class BuildTmpYamlSet(TmpYamlSet):
|
|||
build: TmpYaml
|
||||
recipes: TmpYaml
|
||||
hwdb: TmpYaml
|
||||
non_existent_file: Path
|
||||
|
||||
def write(self):
|
||||
self.build.write()
|
||||
|
@ -108,9 +109,14 @@ class BuildTmpYamlSet(TmpYamlSet):
|
|||
|
||||
@property
|
||||
def args(self):
|
||||
# set configs that should not be read explicitly
|
||||
# to the non_existent_file to avoid influence of
|
||||
# whether `firesim managerinit` has been run
|
||||
# https://github.com/firesim/firesim/pull/1145#issuecomment-1194392085
|
||||
return ['-b', fspath(self.build.path),
|
||||
'-r', fspath(self.recipes.path),
|
||||
'-a', fspath(self.hwdb.path),
|
||||
'-c', fspath(self.non_existent_file)
|
||||
]
|
||||
|
||||
@property
|
||||
|
@ -123,16 +129,25 @@ class RunTmpYamlSet(TmpYamlSet):
|
|||
|
||||
Attributes:
|
||||
"""
|
||||
recipes: TmpYaml
|
||||
hwdb: TmpYaml
|
||||
run: TmpYaml
|
||||
non_existent_file: Path
|
||||
|
||||
def write(self):
|
||||
self.recipes.write()
|
||||
self.hwdb.write()
|
||||
self.run.write()
|
||||
|
||||
@property
|
||||
def args(self):
|
||||
return ['-a', fspath(self.hwdb.path),
|
||||
# set configs that should not be read explicitly
|
||||
# to the non_existent_file to avoid influence of
|
||||
# whether `firesim managerinit` has been run
|
||||
# https://github.com/firesim/firesim/pull/1145#issuecomment-1194392085
|
||||
return ['-b', fspath(self.non_existent_file),
|
||||
'-r', fspath(self.recipes.path),
|
||||
'-a', fspath(self.hwdb.path),
|
||||
'-c', fspath(self.run.path)]
|
||||
|
||||
@property
|
||||
|
@ -145,6 +160,14 @@ def sample_backup_configs() -> Path:
|
|||
dir.is_dir().should.equal(True)
|
||||
return dir
|
||||
|
||||
@pytest.fixture()
|
||||
def non_existent_file(tmp_path: Path) -> Path:
|
||||
# tmp_path is builtin pytest fixture to get a per-test temporary directory that should be clean
|
||||
# but we still make sure that it doesn't exist before giving it
|
||||
file = tmp_path / 'GHOST_FILE'
|
||||
file.exists().should.equal(False)
|
||||
return file
|
||||
|
||||
@pytest.fixture()
|
||||
def scy_build(tmp_path: Path, sample_backup_configs: Path) -> TmpYaml:
|
||||
return TmpYaml(tmp_path, sample_backup_configs / 'sample_config_build.yaml')
|
||||
|
@ -154,8 +177,8 @@ def scy_build_recipes(tmp_path: Path, sample_backup_configs: Path) -> TmpYaml:
|
|||
return TmpYaml(tmp_path, sample_backup_configs / 'sample_config_build_recipes.yaml')
|
||||
|
||||
@pytest.fixture()
|
||||
def build_yamls(scy_build, scy_build_recipes, scy_hwdb) -> BuildTmpYamlSet:
|
||||
return BuildTmpYamlSet(scy_build, scy_build_recipes, scy_hwdb)
|
||||
def build_yamls(scy_build: TmpYaml, scy_build_recipes: TmpYaml, scy_hwdb: TmpYaml, non_existent_file: Path) -> BuildTmpYamlSet:
|
||||
return BuildTmpYamlSet(scy_build, scy_build_recipes, scy_hwdb, non_existent_file)
|
||||
|
||||
@pytest.fixture()
|
||||
def scy_hwdb(tmp_path: Path, sample_backup_configs: Path) -> TmpYaml:
|
||||
|
@ -166,16 +189,8 @@ def scy_runtime(tmp_path: Path, sample_backup_configs: Path) -> TmpYaml:
|
|||
return TmpYaml(tmp_path, sample_backup_configs / 'sample_config_runtime.yaml')
|
||||
|
||||
@pytest.fixture()
|
||||
def run_yamls(scy_hwdb: TmpYaml, scy_runtime: TmpYaml) -> RunTmpYamlSet:
|
||||
return RunTmpYamlSet(scy_hwdb, scy_runtime)
|
||||
|
||||
@pytest.fixture()
|
||||
def non_existent_file(tmp_path):
|
||||
# tmp_path is builtin pytest fixture to get a per-test temporary directory that should be clean
|
||||
# but we still make sure that it doesn't exist before giving it
|
||||
file = tmp_path / 'GHOST_FILE'
|
||||
file.exists().should.equal(False)
|
||||
return file
|
||||
def run_yamls(scy_build_recipes: TmpYaml, scy_hwdb: TmpYaml, scy_runtime: TmpYaml, non_existent_file: Path) -> RunTmpYamlSet:
|
||||
return RunTmpYamlSet(scy_build_recipes, scy_hwdb, scy_runtime, non_existent_file)
|
||||
|
||||
@pytest.fixture()
|
||||
def firesim_parse_args():
|
||||
|
|
Loading…
Reference in New Issue