{"id":19252254,"url":"https://github.com/sccn/eeglab_tests","last_synced_at":"2025-04-21T13:30:50.073Z","repository":{"id":43374111,"uuid":"456786850","full_name":"sccn/eeglab_tests","owner":"sccn","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-20T08:28:50.000Z","size":254538,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-01T13:37:59.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sccn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-08T04:50:09.000Z","updated_at":"2025-03-20T08:29:02.000Z","dependencies_parsed_at":"2025-03-20T09:36:08.581Z","dependency_job_id":null,"html_url":"https://github.com/sccn/eeglab_tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2Feeglab_tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2Feeglab_tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2Feeglab_tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2Feeglab_tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sccn","download_url":"https://codeload.github.com/sccn/eeglab_tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250064528,"owners_count":21368922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T18:26:08.521Z","updated_at":"2025-04-21T13:30:45.064Z","avatar_url":"https://github.com/sccn.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is EEGLAB_tests?\n\nEEGLAB_tests is the repository on GitHub with tests to validate correct behavior of [EEGLAB](https://github.com/sccn/eeglab). This repository uses (or intents to use) concepts like MATLAB Projects, MATLAB Unit Testing, Git LFS, Git submodules and GitHub Actions to automate running tests on EEGLAB in the cloud. The concepts are further explained in this Readme.\n\n# Installing/cloning\n\n```\ngit clone --recurse-submodules https://github.com/sccn/eeglab_tests.git\n```\n\nIf you forgot to clone the submodule, go to the eeglab folder and type\n\n```\ngit submodule update --init --recursive --remote\ngit pull --recurse-submodules\n```\n\n## Running test locally\n\nOpen the EEGLAB_test.prj project, then copy and paste the following code.\n\n```matlab\nproj = currentProject;\nsuite = testsuite(proj.RootFolder,IncludingReferencedProjects=true);\nresults = run(suite)\n```\n\n## MATLAB Projects\n\nMATLAB Projects is a project management tool inside MATLAB for managing MATLAB or Simulink Projects. For more information: \u003chttps://www.mathworks.com/solutions/projects.html\u003e and \u003chttps://www.mathworks.com/help/matlab/projects.html\u003e\nMain benefits for EEGLAB_tests:\n\n- Automate MATLAB path management when opening/closing Project\n- Test specification, picked up by GitHub action for running tests\n- Source Control Management actions from within MATLAB\n\nFor creating a MATLAB Project from an existing MATLAB codebase in a folder, on the **Home** tab, click **New** \u003e **Project** \u003e **From Folder**.\n\nThe MATLAB Project stores it settings and configurations in the resources folder in the repo.\n\n## MATLAB Unit Testing\n\nEEGLAB_tests includes many tests created before MATLAB Unit Testing was available. In order to re-use those tests, EEGLAB_tests includes *wrapperTest.m test functions that call the legacy test functions.\n\nFor more information on MATLAB Unit Testing: \u003chttps://www.mathworks.com/help/matlab/matlab-unit-test-framework.html\u003e and specifically on the function-based tests: \u003chttps://www.mathworks.com/help/matlab/matlab_prog/write-simple-test-case-with-functions.html\u003e.\n\nMATLAB Unit Testing can be extended with plugins, e.g. to perform code coverage analysis. The code coverage can be inspected from running tests from within MATLAB locally, but can also be calculated as part of the cloud-based tests. More information about Unit Test plugin, including Code Coverage:\n\u003chttps://www.mathworks.com/help/matlab/matlab_prog/generate-artifacts-using-matlab-unit-test-plugins.html\u003e\n\nExample unit test in statcond -\u003e statcondTest.m\n## Git LFS\n\nSince some tests require substantial data files to verify correct functionality, and Git is a source code management tool, not a data management tool, EEGLAB_tests uses Git LFS to store large files in GitHub LFS. For more information on using Git LFS with GitHub:\n\u003chttps://docs.github.com/en/repositories/working-with-files/managing-large-files/about-git-large-file-storage\u003e\n\nIn order to work with Git LFS, you need to have Git LFS installed, for this, see:\n\u003chttps://git-lfs.github.com\u003e\n\nOnce Git LFS is installed and configured, you can use the typical `git commit`, `git add`, `git push`, `git pull`, etc. actions and Git LFS will make sure the large files that are configured in the repo are handled automatically through Git LFS.\n\n## Git submodules\n\nThe reference from EEGLAB_tests to the EEGLAB repo with the actual EEGLAB code to be tested is using Git submodules. For more information: \u003chttps://git-scm.com/docs/gitsubmodules\u003e\n\nIn .yml file, need to specify 'recursive' for 'submodules' for CI to pull the nested submodules (EEGLAB plugins) as well.\n\n## GitHub Actions\n\nTo automate actions, or Continuous Integration automation steps directly from GitHub in the Cloud, GitHub provides GitHub Actions. For instance on each commit in a specified branch, all tests should run on a few MATLAB versions and a test report can show if all tests pass or if any would fail with details on why the test failed.\n\nThe following are useful actions for EEGLAB_tests:\n\n- [actions/checkout@v2](https://github.com/actions/checkout)\n  for checking out the repo (consider specifying submodules and lfs) on the test runner in the cloud\n- [matlab-actions/setup-matlab@v1](https://github.com/matlab-actions/setup-matlab/)\n  configure the MATLAB version to be used\n- [matlab-actions/run-tests@v1](https://github.com/matlab-actions/run-tests)\n  run a test suite in the configured MATLAB\n- [codecov/codecov-action@v2](https://github.com/codecov/codecov-action)\n  upload the coverage results that were generated from the testsuite to codecov.io\n- [dorny/test-reporter@v1](https://github.com/dorny/test-reporter)\n  display test pass/fail overview directly in GitHub Actions menu\n- [actions/upload-artifact@v2](https://github.com/actions/upload-artifact)\n  upload artifacts from running tests in cloud back to GitHub Project for inspection\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsccn%2Feeglab_tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsccn%2Feeglab_tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsccn%2Feeglab_tests/lists"}