-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (40 loc) · 1.1 KB
/
ci.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
name: CI
# Triggers the workflow on push or pull request events
on: [push, pull_request]
jobs:
bats-test:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-18.04, macos-10.15, macos-11]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install greadlink
if: startsWith(runner.os, 'macOS')
run: brew install coreutils
- name: Install parallel
if: startsWith(runner.os, 'macOS')
run: brew install parallel
- name: Test code
shell: 'script -q -e -c "bash {0}"'
run: test/run
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install shfmt
run: GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
- name: Install shellcheck
run: brew install shellcheck
- name: Install pre-commit
run: python3 -m pip install pre-commit
- name: Run lint
run: pre-commit run --all-files