{"id":16255573,"url":"https://github.com/grena/tyr","last_synced_at":"2025-04-08T13:19:48.722Z","repository":{"id":41984327,"uuid":"482526308","full_name":"grena/tyr","owner":"grena","description":"\"How to run this test?!\"","archived":false,"fork":false,"pushed_at":"2022-08-17T09:25:50.000Z","size":119,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T00:38:50.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://grena.github.io/tyr/","language":"PHP","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/grena.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}},"created_at":"2022-04-17T13:10:14.000Z","updated_at":"2022-05-24T08:50:07.000Z","dependencies_parsed_at":"2022-07-12T21:32:36.220Z","dependency_job_id":null,"html_url":"https://github.com/grena/tyr","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/grena%2Ftyr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grena%2Ftyr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grena%2Ftyr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grena%2Ftyr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grena","download_url":"https://codeload.github.com/grena/tyr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247847611,"owners_count":21006100,"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-10-10T15:43:24.179Z","updated_at":"2025-04-08T13:19:48.661Z","avatar_url":"https://github.com/grena.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TYR - How to run this test?\n\n**TYR** helps any Akeneo PIM developer to know **how to launch a test file** with the correct commands.\n\n## How to use?\nInstall the CLI tool on your machine:\n```bash\n# Download the .sh script\nwget https://raw.githubusercontent.com/grena/tyr/main/tyr.sh \u0026\u0026 chmod +x tyr.sh\n\n# Make it available as a global command line\nsudo mv tyr.sh /usr/local/bin/tyr\n```\n\nNow, when you want to know how to run a test, just type:\n```bash\ntyr full/path/to/your/TestFile.php  # make sure it's the path relative to the root of the project \n```\n\n## How does it work?\n\n![](https://i.imgur.com/wzU4lou.jpg)\n\n## How to add instructions to run a test?\nThis tool is based on some `.yml` config files in the [`config/instructions`](https://github.com/grena/tyr/tree/main/config/instructions) folder, they are really simple, take a look at them.\n\n1) Fork this repo or make the edit through GitHub web interface.\n2) Either **create or edit a `.yml` file** in the [`config/instructions`](https://github.com/grena/tyr/tree/main/config/instructions) folder:\n```yaml \nsoftware: \"pim-community-dev\" # could be \"pim-enterprise-dev\", it's the name of the project in the composer.json file\nversion: \"master\"             # could a specific version, such as \"6.0\", \"5.0\", etc.\n\n# Instructions live in this data array\ndata:\n  -\n    comment: \"A unit test with PHPSpec\" # Optional comment to help you organise the instructions\n    \n    # Any file starting with these folders will respond to the command.\n    # Given folders are relative to the root of the project.\n    folders:\n      - \"tests/back/Acceptance/spec/\"\n      - \"tests/back/Channel/Specification/\"\n      - \"src/Akeneo/Channel/back/tests/Specification/\"\n      \n    # The commands to run the test.\n    # You can use the {{FILEPATH}} variable, it will be replaced by the path of the file the user gave.\n    commands:\n      - \"APP_ENV=test docker-compose run -u www-data --rm php php vendor/bin/phpspec run {{FILEPATH}}\"\n```\n3) **Merge** your new instructions into the `main` branch.\n4) **Deploy TYR on Heroku**!\n\nThe new instructions will be available for everyone, you don't need to re-install the CLI tool obviously.\n\n## Development\nTo develop the API of this tool, you need `docker` \u0026\u0026 `docker-compose`.\nFork this repo, then:\n```bash\nmake setup\nmake up\n```\n\n## Why Tyr?\n\u003e Týr sacrifices his hand to the monstrous wolf Fenrir, who bites it off when he realizes the gods have bound him.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrena%2Ftyr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrena%2Ftyr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrena%2Ftyr/lists"}