mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 01:13:30 -05:00
fix: fetch data directories before CI tests
This commit is contained in:
1 parent
29bb72c7ec
commit
c4c87a5f7a
2 files changed
+23
No files matched your search
@@ -142,6 +142,14 @@ jobs:
|
||||
continue-on-error: true
|
||||
run: python scripts/export_native.py --all --fetch --output-dir "$RUNNER_TEMP/native"
|
||||
|
||||
# A pack built without its data directories exits non-zero: it is not
|
||||
# the pack a user gets. Tests that build packs need the same trees a
|
||||
# release build has, as deploy-site.yml fetches them.
|
||||
- name: Fetch the data directories
|
||||
run: python scripts/refresh_data_dirs.py
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Run test suite
|
||||
# No test downloads a release asset: 252 MB files fetched into the
|
||||
# shared cache filled the runner's disk and changed what later tests
|
||||
|
||||
@@ -3514,5 +3514,20 @@ class TheIssueFormListsEveryPlatform(unittest.TestCase):
|
||||
self.assertIn(display, options)
|
||||
|
||||
|
||||
|
||||
class TheTestJobHasTheDataTrees(unittest.TestCase):
|
||||
"""Packs built without data directories exit non-zero; the CI test job
|
||||
had none, and two pack parity tests failed there only."""
|
||||
|
||||
def test_the_trees_are_fetched_before_the_suite(self):
|
||||
steps = yaml.safe_load(
|
||||
(ROOT / ".github" / "workflows" / "validate.yml").read_text()
|
||||
)["jobs"]["run-tests"]["steps"]
|
||||
runs = [step.get("run", "") for step in steps]
|
||||
fetch = next(i for i, run in enumerate(runs) if "refresh_data_dirs.py" in run)
|
||||
suite = next(i for i, run in enumerate(runs) if "unittest discover" in run)
|
||||
self.assertLess(fetch, suite)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user