-
Notifications
You must be signed in to change notification settings - Fork 11
73 lines (65 loc) · 2 KB
/
testing.yml
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
65
66
67
68
69
70
71
72
73
name: testing
on:
push:
branches-ignore:
- "master"
paths-ignore:
- "README.md"
pull_request:
jobs:
test-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Print bash version
run: |
bash --version
- uses: actions/checkout@v2
- name: Lint with shellcheck
uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
path: "."
pattern: "bargs.sh"
exclude: "./.git/*"
- name: Install dependencies
run: |
sudo apt-get update -y && sudo apt-get install -y bsdmainutils
- name: Test with bash script
run: |
bash tests.sh
test-macos:
runs-on: macos-latest
steps:
- name: Print bash version
run: |
bash --version
- uses: actions/checkout@v2
- name: Install dependencies
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install bash util-linux
- name: Test with bash script
run: |
bash tests.sh
test-wsl:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
shell: powershell
run: |
$url = "http://bargs.link/utils/dos2unix-7.4.1-win64.zip"
$output = ".\dos2unix.zip"
(New-Object System.Net.WebClient).DownloadFile($url, $output)
Expand-Archive .\dos2unix.zip .\dos2unix
.\dos2unix\bin\dos2unix.exe bargs.sh bargs_vars example.sh tests.sh
$url = "https://aka.ms/wsl-ubuntu-1804"
$output = ".\Ubuntu.zip"
(New-Object System.Net.WebClient).DownloadFile($url, $output)
Expand-Archive .\Ubuntu.zip .\Ubuntu
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
.\Ubuntu\ubuntu1804.exe install --root
- name: Test with bash script
shell: powershell
run: |
wsl -u root -d Ubuntu-18.04 -- source ./tests.sh