New bash library, and well as bash linting and formatting (#170)

* Allows unit and integration tests to share the same bash code via a utility library named testlib.sh.
* Linting and formatting of bash scripts was added to the Makefile targets lint and format.
* Updated the docker image and Go used by git actions
This commit is contained in:
Dmitry Holodov
2022-08-25 13:24:13 -05:00
committed by GitHub
parent 38b079cb96
commit 007162b929
21 changed files with 417 additions and 1191 deletions

View File

@@ -10,9 +10,9 @@ name: checks
jobs:
linter-check:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run go fmt
run: diff -u <(echo -n) <(gofmt -d -s .)
@@ -21,12 +21,12 @@ jobs:
run: make lint
vet-check:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.17.x'
- uses: actions/checkout@v2
go-version: '1.18.x'
- uses: actions/checkout@v3
- name: Run go vet
run: |

View File

@@ -10,9 +10,9 @@ jobs:
integration-tests:
strategy:
matrix:
go-version: [1.17.x]
go-version: [1.18.x]
node-version: [16.x]
platform: [ubuntu-latest]
platform: [ubuntu-22.04]
runs-on: ${{ matrix.platform }}
steps:
- id: go-cache-paths
@@ -20,14 +20,14 @@ jobs:
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# cache go build cache
- name: Cache go modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
@@ -35,7 +35,7 @@ jobs:
# cache go mod cache
- name: Cache go modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

View File

@@ -10,9 +10,9 @@ jobs:
unit-tests:
strategy:
matrix:
go-version: [1.17.x]
go-version: [1.18.x]
node-version: [16.x]
platform: [ubuntu-latest]
platform: [ubuntu-22.04]
runs-on: ${{ matrix.platform }}
steps:
- id: go-cache-paths
@@ -20,14 +20,14 @@ jobs:
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# cache go build cache
- name: Cache go modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
@@ -35,7 +35,7 @@ jobs:
# cache go mod cache
- name: Cache go modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}