All Projects → mig4 → setup-bats

mig4 / setup-bats

Licence: MIT license
GitHub Action to setup BATS testing framework

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to setup-bats

ssh2actions
Connect to GitHub Actions VM via SSH for interactive debugging
Stars: ✭ 62 (+148%)
Mutual labels:  action, github-actions, github-action
gha-setup-scancentral-client
GitHub Action to set up Fortify ScanCentral Client
Stars: ✭ 15 (-40%)
Mutual labels:  setup, action, github-action
github-run-tests-action
mabl Github Actions implementation
Stars: ✭ 39 (+56%)
Mutual labels:  action, github-actions, github-action
setup-jdk
(DEPRECATED) Set up your GitHub Actions workflow with a specific version of AdoptOpenJDK
Stars: ✭ 32 (+28%)
Mutual labels:  action, github-actions, github-action
hugo-action
Commands to help with building Hugo based static sites
Stars: ✭ 65 (+160%)
Mutual labels:  action, github-actions, github-action
clojure-dependency-update-action
A simple GitHub Actions job to create Pull Requests for outdated dependencies in clojure projects
Stars: ✭ 37 (+48%)
Mutual labels:  action, github-actions, github-action
action-sync-node-meta
GitHub Action that syncs package.json with the repository metadata.
Stars: ✭ 25 (+0%)
Mutual labels:  action, github-actions, github-action
assign-one-project-github-action
Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
Stars: ✭ 140 (+460%)
Mutual labels:  action, github-actions, github-action
git-actions
A GitHub Action to run arbitrary git commands
Stars: ✭ 72 (+188%)
Mutual labels:  action, github-actions, github-action
recent-activity
Add your recent activity to your profile readme!
Stars: ✭ 87 (+248%)
Mutual labels:  github-actions, github-action
upx-action
Strips and runs upx on binaries
Stars: ✭ 17 (-32%)
Mutual labels:  action, github-actions
setup-scheme
Github Actions CI / CD setup for Scheme
Stars: ✭ 13 (-48%)
Mutual labels:  setup, github-actions
mypy-check
github action for python's mypy type checker tool
Stars: ✭ 23 (-8%)
Mutual labels:  action, github-action
action-setup-kube-tools
Github Action that setup Kubernetes tools (kubectl, kustomize, helm, kubeconform, conftest, yq, rancher, tilt, skaffold) very fast and cache them on the runner. Please [✩Star] if you're using it!
Stars: ✭ 45 (+80%)
Mutual labels:  github-actions, github-action
sentry-releases-action
A GitHub action that creates releases for Sentry.io.
Stars: ✭ 38 (+52%)
Mutual labels:  github-actions, github-action
GitHub-Pages-deploy
A GitHub Action to deploy a static site on GitHub Pages.
Stars: ✭ 42 (+68%)
Mutual labels:  action, github-actions
cuda-toolkit
GitHub Action to install CUDA
Stars: ✭ 34 (+36%)
Mutual labels:  action, github-actions
action-autotag
Automatically generate a new tag when the manifest file (package.json, Dockerfile, custom file, etc) version changes.
Stars: ✭ 45 (+80%)
Mutual labels:  action, github-actions
action-homebrew-bump-formula
⚙️ A GitHub Action to easily bump Homebrew formula on new release
Stars: ✭ 68 (+172%)
Mutual labels:  action, github-actions
tectonic-action
Compile Tex files easily
Stars: ✭ 77 (+208%)
Mutual labels:  action, github-action

tag-badge CI

Setup BATS 🦇

A :octocat: GitHub Action to setup BATS testing framework.

Usage 🚀

A sample workflow to run tests using BATS (.github/workflows/ci.yml):

name: "CI"
on: [push, pull_request]
jobs:
  build:
    name: build
    runs-on: ubuntu-latest
    steps:

      - name: Setup BATS
        uses: mig4/setup-bats@v1
        with:
          bats-version: 1.2.1

      - name: Check out code
        uses: actions/checkout@v1

      - name: Test
        run: bats -r .

Options 🎨

Options available as keys in with block

  • bats-version (string): version of BATS to setup, defaults to 1.2.1 if not set

Platforms 🖥

So far this action has only been tested on Linux environments.

Contributing 🤝

See known issues, if you found one that's not on the list or have a suggestion for improvement, open a new issue. If you can, fork and send a PR, it will be appreciated 💖.

Hacking 🧰

Building

Install the dependencies

$ npm install

Build the typescript, apply formatting, lint and package the code for distribution and run unit tests:

$ npm run all

Run the tests separately ✔️

$ npm test
...
 PASS  __tests__/installer.test.ts
  installer tests
    ✓ Acquires version of BATS if no matching version is installed (1051ms)
    ✓ Throws if no matching version of BATS can be found (674ms)

Code

The action.yml file defines the inputs and output, description, etc. of the action.

See the documentation:

Publishing to a distribution branch

Actions are run from GitHub repos so the branch which will be used at runtime needs to have the dist/ folder checked-in. It's recommended for users to only refer to released versions instead of consuming master directly.

The distribution is created with ncc which can be invoked via:

$ npm run package
$ git add dist
$ git commit -a -m "prod package"

Now to release a new minor/patch versions (replace .x.y as appropriate):

# update "version" property in `package.json`
$ npm install
$ npm run all
$ git add -A
$ git commit -v -m "Release v1.x.y"
$ git push
$ git tag -s v1.x.y
$ git tag -fs v1 -m "Update v1 tag"
$ git push --tags --force

For the tag to be published to marketplace you need to create a release from it which you can do by going into Releases in GitHub UI, then Tags and clicking the menu next to the newly created tag and select Create release. Alternatively use the URL (replace x.y as appropriate): https://github.com/mig4/setup-bats/releases/new?tag=v1.x.y

The action is now published! 🚀

See the versioning documentation

Acknowledgements 👍

License 📝

license-badge

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].