-
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 2.06 KB
/
Copy pathshellcheck.yml
File metadata and controls
64 lines (56 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on:
push:
branches: [ main, 'feat/**', 'fix/**', 'test/**', 'ci/**', 'docs/**' ]
pull_request:
branches: [ main ]
jobs:
lint-and-test:
name: Lint, ShellCheck & Full Test (Ubuntu)
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install ShellCheck
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
- name: Run test suite
run: |
bash tests/test_all.sh
distro-matrix:
name: Functional Test (${{ matrix.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu
image: ubuntu:24.04
- name: Fedora
image: fedora:latest
- name: Arch Linux
image: archlinux:latest
- name: Alpine
image: alpine:latest
container:
image: ${{ matrix.image }}
steps:
- name: Install essential tools
run: |
if command -v apt-get >/dev/null 2>&1; then
apt-get update && apt-get install -y git bash coreutils python3 tar gzip bzip2 xz-utils zip unzip iproute2 procps openssh-client bsdmainutils kmod
elif command -v dnf >/dev/null 2>&1; then
dnf install -y git bash coreutils python3 tar gzip bzip2 xz zip unzip iproute procps-ng which openssh util-linux kmod
elif command -v pacman >/dev/null 2>&1; then
pacman -Syu --noconfirm git bash coreutils python tar gzip bzip2 xz zip unzip iproute2 procps-ng which openssh util-linux kmod
elif command -v apk >/dev/null 2>&1; then
apk add --no-cache git bash coreutils python3 tar gzip bzip2 xz zip unzip iproute2 procps which openssh-client util-linux kmod
fi
- name: Check out repository
uses: actions/checkout@v4
- name: Mark workspace as safe git repository
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Run functional test suite
run: |
bash tests/functional_test.sh