Merge pull request #168 from saveriomiroddi/replace_travis_with_github_actions
Replace Travis with GitHub actions
This commit is contained in:
commit
6bdb11b6a8
|
@ -0,0 +1,11 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Run shellcheck
|
||||||
|
run: ci/run_shellcheck.sh
|
14
.travis.yml
14
.travis.yml
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
dist: bionic
|
|
||||||
language: bash
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- "/opt/shellcheck"
|
|
||||||
script:
|
|
||||||
- mkdir -p /opt/shellcheck
|
|
||||||
- "[[ ! -e /opt/shellcheck/shellcheck ]] && wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz
|
|
||||||
| tar -xJv -O shellcheck-stable/shellcheck | sudo tee /opt/shellcheck/shellcheck
|
|
||||||
> /dev/null || true"
|
|
||||||
- sudo chmod +x /opt/shellcheck/shellcheck
|
|
||||||
- "/opt/shellcheck/shellcheck --version"
|
|
||||||
- "/opt/shellcheck/shellcheck $(grep -lzP '^#!/bin/\\w+sh' -r .)"
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -o pipefail
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o errtrace
|
||||||
|
shopt -s inherit_errexit
|
||||||
|
|
||||||
|
if [[ ! -e /opt/shellcheck/shellcheck ]]; then
|
||||||
|
mkdir -p /opt/shellcheck
|
||||||
|
|
||||||
|
wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz \
|
||||||
|
| tar xJv -O shellcheck-stable/shellcheck \
|
||||||
|
> /opt/shellcheck/shellcheck
|
||||||
|
|
||||||
|
chmod +x /opt/shellcheck/shellcheck
|
||||||
|
fi
|
||||||
|
|
||||||
|
/opt/shellcheck/shellcheck --version
|
||||||
|
|
||||||
|
grep -lZP '^#!/bin/\w+sh' -R | xargs -0 /opt/shellcheck/shellcheck
|
Loading…
Reference in New Issue