-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github Action Example / CI Refactor (#66)
* Add installation instructions on read-me * Update github-action to use asdf to install dependencies rather than docker * Don't use 'v' in bats asdf config * Update messaging in ci action * Update messaging in ci action * Update read-me for github-action example link * Remove action-validator from asdf plugins
- Loading branch information
1 parent
37a71da
commit cac039e
Showing
2 changed files
with
36 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,44 @@ | ||
name: Unit Tests and Linters | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: push | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
# Set the job key. The key is displayed as the job name | ||
# when a job name is not provided | ||
test-lint: | ||
# Name the Job | ||
name: Unit tests and Lint code base | ||
# Set the type of machine to run on | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checks out a copy of your repository on the ubuntu-latest machine | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies with asdf | ||
uses: asdf-vm/actions/install@v1 | ||
with: | ||
tool_versions: | | ||
bats 1.3.0 | ||
shellcheck 0.8.0 | ||
semver 3.3.0 | ||
- name: Display semver help | ||
run: | | ||
echo "Use semver locally or in your workflow!" | ||
echo "asdf plugin add semver" | ||
echo "asdf install semver latest" | ||
echo "asdf global semver latest" | ||
echo "semver --version" | ||
semver --version | ||
echo "semver --help" | ||
semver --help | ||
- name: Shellcheck linter | ||
run: | | ||
shellcheck src/semver | ||
shellcheck test/documentation-test | ||
- name: Unit tests | ||
shell: bash | ||
run: make test | ||
- name: Linter | ||
shell: bash | ||
run: make lint | ||
run: bats test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters