mirror of
https://github.com/appleboy/drone-ssh.git
synced 2026-03-05 22:57:00 -05:00
- Add gpg to the list of installed packages for testing - Specify Codecov upload flags based on Go version Signed-off-by: appleboy <appleboy.tw@gmail.com>
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
name: Lint and Testing
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
|
|
- name: Setup golangci-lint
|
|
uses: golangci/golangci-lint-action@v7
|
|
with:
|
|
version: latest
|
|
args: --verbose
|
|
|
|
- uses: hadolint/hadolint-action@v3.1.0
|
|
name: hadolint for Dockerfile
|
|
with:
|
|
dockerfile: docker/Dockerfile
|
|
|
|
testing:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go-version: ["1.24", "1.25"]
|
|
container:
|
|
image: golang:${{ matrix.go-version }}-alpine
|
|
options: --sysctl net.ipv6.conf.all.disable_ipv6=0
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: setup sshd server
|
|
run: |
|
|
apk add git make curl perl bash build-base zlib-dev ucl-dev sudo gpg
|
|
make ssh-server
|
|
|
|
- name: testing
|
|
run: |
|
|
make test
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
flags: go-${{ matrix.go-version }}
|