drone-ssh/.github/workflows/testing.yml
appleboy 37b95a017d
chore: upgrade Go and dependencies to improve compatibility
- Update Go version from 1.22 to 1.23
- Upgrade golang.org/x/crypto from version 0.29.0 to 0.36.0
- Upgrade golang.org/x/sys from version 0.27.0 to 0.31.0
- Change Docker image in GitHub Actions from golang:1.22-alpine to golang:1.23-alpine

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-03-09 21:43:05 +08:00

51 lines
1.1 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@v6
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
container:
image: golang:1.23-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
make ssh-server
- name: testing
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4