Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
David Runge
arch-boxes
Commits
c19e835a
Unverified
Commit
c19e835a
authored
Oct 11, 2019
by
Christian Rebischke
Committed by
GitHub
Oct 11, 2019
Browse files
Merge pull request #58 from shibumi/shibumi/add-more-github-ci-workflows
add more ci workflows
parents
3f202663
ed2c614d
Changes
2
Hide whitespace changes
Inline
Side-by-side
.github/workflows/main.yml
View file @
c19e835a
...
...
@@ -4,14 +4,56 @@ on: [push, pull_request]
jobs
:
vagrant-validation
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v1
-
name
:
install packer
run
:
./generic-ci.sh install
-
name
:
verify packer configuration
run
:
./generic-ci.sh verify
run
:
./generic-ci.sh install-packer
-
name
:
verify local.json
run
:
./generic-ci.sh verify-local
-
name
:
verify vagrant.json
run
:
./generic-ci.sh verify-official
python-syntax-validation
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v1
-
name
:
install flake8
run
:
./generic-ci.sh install-flake8
-
name
:
run flake8 checks
run
:
./generic-ci.sh flake8
python-format-validation
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v1
-
name
:
install yapf
run
:
./generic-ci.sh install-yapf
-
name
:
run yapf checks
run
:
./generic-ci.sh yapf
shell-syntax-validation
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v1
-
name
:
run shellcheck
run
:
./generic-ci.sh shellcheck
shell-format-validation
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v1
-
name
:
install-shfmt
run
:
./generic-ci.sh install-shfmt
-
name
:
run shfmt checks
run
:
./generic-ci.sh shfmt
generic-ci.sh
View file @
c19e835a
...
...
@@ -3,7 +3,7 @@ set -x
case
$1
in
install
)
install
-packer
)
PACKER_CURRENT_VERSION
=
"
$(
curl
-s
https://checkpoint-api.hashicorp.com/v1/check/packer | jq
-r
-M
'.current_version'
)
"
PACKER_URL
=
"https://releases.hashicorp.com/packer/
$PACKER_CURRENT_VERSION
/packer_
${
PACKER_CURRENT_VERSION
}
_linux_amd64.zip"
PACKER_SHA256
=
"https://releases.hashicorp.com/packer/
$PACKER_CURRENT_VERSION
/packer_
${
PACKER_CURRENT_VERSION
}
_SHA256SUMS"
...
...
@@ -20,13 +20,48 @@ case $1 in
grep
linux_amd64
"packer_
${
PACKER_CURRENT_VERSION
}
_SHA256SUMS"
>
packer_SHA256SUM_linux_amd64
sha256sum
--check
--status
packer_SHA256SUM_linux_amd64
unzip
"packer_
${
PACKER_CURRENT_VERSION
}
_linux_amd64.zip"
./packer
--version
;;
verify
)
./packer
--version
install-shfmt
)
curl
-L
https://github.com/mvdan/sh/releases/download/v2.6.4/shfmt_v2.6.4_linux_amd64
-o
shfmt
chmod
+x ./shfmt
;;
install-yapf
)
pip3
install
yapf
--user
;;
install-flake8
)
pip3
install
flake8
--user
;;
verify-official
)
jq
".
\"
post-processors
\"
[0] |= map(select(.
\"
type
\"
!=
\"
vagrant-cloud
\"
))"
vagrant.json | ./packer validate
-var
"iso_url=https://downloads.archlinux.de/iso/
$(
date
+
'%Y.%m'
)
.01/archlinux-
$(
date
+
'%Y.%m'
)
.01-x86_64.iso"
-var
"iso_checksum_url=https://downloads.archlinux.de/iso/
$(
date
+
'%Y.%m'
)
.01/sha1sums.txt"
-
;;
verify-local
)
jq
".
\"
post-processors
\"
[0] |= map(select(.
\"
type
\"
!=
\"
vagrant-cloud
\"
))"
local.json | ./packer validate
-var
"iso_url=https://downloads.archlinux.de/iso/
$(
date
+
'%Y.%m'
)
.01/archlinux-
$(
date
+
'%Y.%m'
)
.01-x86_64.iso"
-var
"iso_checksum_url=https://downloads.archlinux.de/iso/
$(
date
+
'%Y.%m'
)
.01/sha1sums.txt"
-
;;
# We use + instead of \; here because find doesn't pass
# the exit code through when used with \;
shellcheck
)
find
.
-iname
"*.sh"
-exec
shellcheck
{}
+
;;
shfmt
)
find
.
-iname
"*.sh"
-exec
./shfmt
-i
2
-ci
-d
{}
+
;;
yapf
)
find
.
-iname
"*.py"
-exec
python3
-m
yapf
-d
{}
+
;;
flake8
)
find
.
-iname
"*.py"
-exec
python3
-m
flake8
{}
+
;;
*
)
exit
1
;;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment