Skip to content

Commit 39c4d28

Browse files
authored
Merge pull request #161 from github/djdefi-actionable
CI with GitHub Actions
2 parents 0bab374 + a413701 commit 39c4d28

File tree

3 files changed

+42
-5
lines changed

3 files changed

+42
-5
lines changed

.github/workflows/main.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test and build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
os: ['ubuntu-latest', 'macos-latest']
10+
runs-on: ${{ matrix.os }}
11+
12+
steps:
13+
- name: Install Dependencies (Linux)
14+
run: |
15+
sudo apt-get update -y
16+
sudo apt-get install -y devscripts debhelper moreutils fakeroot jq
17+
wget "https://storage.googleapis.com/shellcheck/shellcheck-v0.7.0.linux.x86_64.tar.xz"
18+
tar --xz -xvf "shellcheck-v0.7.0.linux.x86_64.tar.xz"
19+
sudo cp shellcheck-v0.7.0/shellcheck /usr/bin/shellcheck
20+
if: matrix.os == 'ubuntu-latest'
21+
- name: Install Dependencies (macOS)
22+
run: |
23+
brew install gnu-tar shellcheck jq
24+
brew unlink parallel
25+
brew install moreutils
26+
if: matrix.os == 'macos-latest'
27+
- name: Get Sources
28+
uses: actions/checkout@v2
29+
- name: Test
30+
run: |
31+
export PATH="$PATH:/snap/bin"
32+
make test
33+
shell: bash
34+
- name: Build
35+
run: debuild -uc -us
36+
if: matrix.os == 'ubuntu-latest'
37+

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ matrix:
1414
dist: trusty
1515
sudo: required
1616
install:
17-
- wget "https://storage.googleapis.com/shellcheck/shellcheck-v0.4.7.linux.x86_64.tar.xz"
18-
- tar --xz -xvf "shellcheck-v0.4.7.linux.x86_64.tar.xz"
17+
- wget "https://storage.googleapis.com/shellcheck/shellcheck-v0.7.0.linux.x86_64.tar.xz"
18+
- tar --xz -xvf "shellcheck-v0.7.0.linux.x86_64.tar.xz"
1919
addons:
2020
apt:
2121
packages:

test/test-shellcheck.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ BASE_PATH=$(cd "$(dirname "$0")/../" && pwd)
99
begin_test "shellcheck: reports no errors or warnings"
1010
(
1111
set -e
12-
# We manually install Shellcheck 0.4.7 on Travis Linux builds as other options
12+
# We manually install Shellcheck 0.7.0 on Linux builds as other options
1313
# are too old.
14-
if [ -x "$BASE_PATH/shellcheck-v0.4.7/shellcheck" ]; then
15-
shellcheck() { "$BASE_PATH/shellcheck-v0.4.7/shellcheck" "$@"; }
14+
if [ -x "$BASE_PATH/shellcheck-v0.7.0/shellcheck" ]; then
15+
shellcheck() { "$BASE_PATH/shellcheck-v0.7.0/shellcheck" "$@"; }
1616
fi
1717

1818
if ! type shellcheck 1>/dev/null 2>&1; then

0 commit comments

Comments
 (0)