{"id":18783965,"url":"https://github.com/sparkpost/github-action-tester-python","last_synced_at":"2025-12-20T21:30:19.955Z","repository":{"id":138516362,"uuid":"293925537","full_name":"SparkPost/github-action-tester-python","owner":"SparkPost","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-24T12:42:54.000Z","size":1592,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-12-29T11:49:19.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/SparkPost.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":"2020-09-08T20:56:42.000Z","updated_at":"2020-09-24T12:42:48.000Z","dependencies_parsed_at":"2023-03-16T19:15:30.025Z","dependency_job_id":null,"html_url":"https://github.com/SparkPost/github-action-tester-python","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Fgithub-action-tester-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Fgithub-action-tester-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Fgithub-action-tester-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Fgithub-action-tester-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SparkPost","download_url":"https://codeload.github.com/SparkPost/github-action-tester-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699583,"owners_count":19682575,"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-07T20:41:28.480Z","updated_at":"2025-12-20T21:30:14.663Z","avatar_url":"https://github.com/SparkPost.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"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\nThis is a Python3-flavored hard fork of https://github.com/skx/github-action-tester, which is really more Go-flavored.\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: SparkPost/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: SparkPost/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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Fgithub-action-tester-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparkpost%2Fgithub-action-tester-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Fgithub-action-tester-python/lists"}