{"id":15517334,"url":"https://github.com/skx/github-action-tester","last_synced_at":"2025-09-19T07:03:53.643Z","repository":{"id":65155705,"uuid":"172305880","full_name":"skx/github-action-tester","owner":"skx","description":"Run tests when pull-requests are opened, or commits pushed.","archived":false,"fork":false,"pushed_at":"2020-07-17T11:57:33.000Z","size":106,"stargazers_count":26,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T04:19:14.464Z","etag":null,"topics":["github","github-action","test","testing"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/skx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"skx","custom":"https://steve.fi/donate/"}},"created_at":"2019-02-24T06:50:01.000Z","updated_at":"2024-05-30T16:25:07.000Z","dependencies_parsed_at":"2023-01-13T15:42:31.662Z","dependency_job_id":null,"html_url":"https://github.com/skx/github-action-tester","commit_stats":{"total_commits":34,"total_committers":2,"mean_commits":17.0,"dds":0.02941176470588236,"last_synced_commit":"8b094fe3f87bc39af5c4062b307660981995997b"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fgithub-action-tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fgithub-action-tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fgithub-action-tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fgithub-action-tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skx","download_url":"https://codeload.github.com/skx/github-action-tester/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366685,"owners_count":21418768,"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":["github","github-action","test","testing"],"created_at":"2024-10-02T10:12:38.671Z","updated_at":"2025-09-19T07:03:47.516Z","avatar_url":"https://github.com/skx.png","language":"Shell","readme":"\n# GitHub Action for Running tests\n\nThis repository contains a simple GitHub Action which allows you to run a shell-script every time an event occurs within your repository.\n\n* [GitHub Action for Running tests](#github-action-for-running-tests)\n  * [Overview](#overview)\n  * [Enabling the action](#enabling-the-action)\n  * [Sample Configuration](#sample-configuration)\n  * [Advanced Configuration](#advanced-configuration)\n\n\n## Overview\n\nThis action allows you to run a shell-script when your workflow action is triggered.  If your script terminates with an exit-code of 0 that is regarded as a pass, otherwise the action will be marked as a failure.\n\nThe expectation is that you'll use this action to launch your project-specific test-cases, ensuring that all pull-requests, commits, or both, are tested automatically.\n\nBecause the action ultimately executes a shell-script contained in your repository you can be as simple or complex as you can like, for example a [golang](https://golang.org/) project might contain a script such as this:\n\n    #!/bin/sh\n    # Run the go-vet tool.\n    go vet ./..           || exit 1\n    # Run the test-cases, with race-detection.\n    go test -race ./...   || exit 1\n    # Everything passed, exit cleanly.\n    exit 0\n\nA C-based project could contain something like this instead:\n\n    #!/bin/sh\n    make \u0026\u0026 make test\n\nBut as you can install/invoke arbitrary commands, and update them as your project grows, you can do almost anything you wish.\n\n\n\n## Enabling the action\n\nThere are two steps required to use this action:\n\n* Enable the action inside your repository.\n  * You'll probably want to enable it upon pull-requests, to ensure their quality.\n  * You might also want to enable it to run each time a push is made to your repository, for completeness.\n* Add your project-specific test-steps to a script in your repository.\n  * By default this action will execute `.github/run-tests.sh`, but you can specify a different name if you prefer.\n  * The exit-code of your script will determine the result.\n\n\n\n## Sample Configuration\n\nDefining Github Actions requires that you create a directory `.github/workflows` inside your repository.  Inside the workflow-directory you create files which are processed when various events occur.\n\nFor example:\n\n* .`github/workflows/pull_request.yml`\n  * This is used when a pull-request is created/updated upon your repository.\n* `.github/workflows/push.yml`\n  * This is used when a commit is pushed to your repository.\n\nThe simplest example of using this action would be to create the file `.github/workflows/pull_request.yml` with the following contents:\n\n```yml\non: pull_request\nname: Pull Request\njobs:\n  test:\n    name: Run tests\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@master\n    - name: Test\n      uses: skx/github-action-tester@master\n```\n\nThis example will run the default test-script, `.github/run-tests.sh`, every time a pull-request is created, edited, or updated.\n\n\n\n## Advanced Configuration\n\nAs noted github actions can be launched on multiple events, for example pushes to branches, new releases, pull-request related events, and similar.\n\nBecause you probably wish to run different tests/scripts on these different events it is possible to override the name/path of the shell-script which is executed on a per-event basis.\n\nFor example you might wish to run more thorough tests upon pull-requests, and a smaller subset when a push is made to your `master` branch (on the assumption that commits there are rare, and the usual workflow will have ensured the full-tests will have been executed via pull-requests).\n\nAs an example you might create a workflow for use solely with pushes to master, in the file `.github/workflows/push.yml`:\n\n```yml\non:\n  push:\n    branches:\n    - master\nname: Push Event\njobs:\n  test:\n    name: Run tests\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@master\n    - name: Test\n      uses: skx/github-action-tester@master\n      with:\n        script: .github/fast-tests.sh\n```\n\nHere we've done two things:\n\n* We've limited the action to only apply to pushes made to the `master` branch.\n* We've explicitly set the name of the testing-script to `.github/fast-tests.sh`\n  * With the expectation this script contains only \"quick\" tests.\n  * With slower tests being applied to pull-requests.\n","funding_links":["https://github.com/sponsors/skx","https://steve.fi/donate/"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskx%2Fgithub-action-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskx%2Fgithub-action-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskx%2Fgithub-action-tester/lists"}