-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from progrium/github-actions
tests: migrate tests from circleci to github actions
- Loading branch information
Showing
9 changed files
with
172 additions
and
59 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,13 +1,10 @@ | ||
--- | ||
version: 2 | ||
jobs: | ||
build: | ||
machine: true | ||
working_directory: ~/progrium/go-basher | ||
parallelism: 1 | ||
steps: | ||
- checkout | ||
- run: | | ||
make build | ||
- run: | | ||
go get -d -t | ||
go test -v | ||
true |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- "type: dependencies" |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
default: true | ||
|
||
# Line length | ||
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md013 | ||
MD013: false | ||
|
||
# Inline HTML | ||
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md033 | ||
MD033: false |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
line-length: disable |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: CI | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
shell: bash | ||
run: | | ||
go mod init github.com/progrium/go-basher | ||
go mod tidy | ||
make build | ||
- name: Test | ||
shell: bash | ||
run: | | ||
go get -d -t | ||
go test -v |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
name: "lint" | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
markdown-lint: | ||
name: markdown-lint | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v4 | ||
- name: Run markdown-lint | ||
uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb | ||
# v1.5.0 => 04d43ee9191307b50935a753da3b775ab695eceb | ||
with: | ||
config: ".github/linters/.markdown-lint.yml" | ||
args: "./README.md" | ||
|
||
shellcheck: | ||
name: shellcheck | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v4 | ||
- name: Run shellcheck | ||
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 | ||
# 1.1.0 => 94e0aab03ca135d11a35e5bfc14e6746dc56e7e9 | ||
env: | ||
SHELLCHECK_OPTS: -e SC2034 | ||
|
||
shfmt: | ||
name: shfmt | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v4 | ||
- name: Run shfmt | ||
uses: luizm/action-sh-checker@c6edb3de93e904488b413636d96c6a56e3ad671a | ||
# v0.3.0 => 7f44869033b40ee4ffe7dc76c87a1bc66e3d025a | ||
env: | ||
SHFMT_OPTS: -l -bn -ci -i 2 -d | ||
with: | ||
sh_checker_shellcheck_disable: true | ||
|
||
yamllint: | ||
name: yamllint | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v4 | ||
- name: Run yamllint | ||
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c | ||
# v3.0.4 => ed2b6e911569708ed121c14b87d513860a7e36a7 | ||
with: | ||
config_file: ".github/linters/.yamllint.yml" |
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
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
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,11 +1,11 @@ | ||
set -eo pipefail | ||
|
||
hello-bash() { | ||
echo "Hello world from Bash" | ||
echo "Hello world from Bash" | ||
} | ||
|
||
main() { | ||
echo "Arguments:" "$@" | ||
hello-bash | reverse | ||
curl -s https://api.github.com/repos/progrium/go-basher | json-pointer /owner/login | ||
echo "Arguments:" "$@" | ||
hello-bash | reverse | ||
curl -s https://api.github.com/repos/progrium/go-basher | json-pointer /owner/login | ||
} |