| 1 |
name: Lint and Testing |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
pull_request: |
| 6 |
|
| 7 |
jobs: |
| 8 |
lint: |
| 9 |
runs-on: ubuntu-latest |
| 10 |
steps: |
| 11 |
- name: Setup go |
| 12 |
uses: actions/setup-go@v5 |
| 13 |
with: |
| 14 |
go-version: "^1.21" |
| 15 |
- name: Checkout repository |
| 16 |
uses: actions/checkout@v3 |
| 17 |
- name: Setup golangci-lint |
| 18 |
uses: golangci/golangci-lint-action@v3 |
| 19 |
with: |
| 20 |
version: latest |
| 21 |
args: --verbose |
| 22 |
|
| 23 |
testing: |
| 24 |
runs-on: ubuntu-latest |
| 25 |
container: golang:1.19-alpine |
| 26 |
steps: |
| 27 |
- name: Checkout repository |
| 28 |
uses: actions/checkout@v3 |
| 29 |
|
| 30 |
- name: setup sshd server |
| 31 |
run: | |
| 32 |
apk add git make curl perl bash build-base zlib-dev ucl-dev |
| 33 |
make ssh-server |
| 34 |
|
| 35 |
- name: testing |
| 36 |
run: | |
| 37 |
make test |
| 38 |
|
| 39 |
- name: Upload coverage to Codecov |
| 40 |
uses: codecov/codecov-action@v3 |