mirror of
https://github.com/coredns/coredns.git
synced 2025-12-07 10:55:17 -05:00
* Update build * Update Go to 1.23.0 * Update minimum Go version to 1.22. * Update golangci-lint to v1.60.1. * Make GitHub action version hash/tag consistent. * Increase dependabot open PRs from 5 to 20. Signed-off-by: SuperQ <superq@gmail.com> * Fixup lint issue. Signed-off-by: SuperQ <superq@gmail.com> --------- Signed-off-by: SuperQ <superq@gmail.com>
90 lines
2.3 KiB
YAML
90 lines
2.3 KiB
YAML
name: Go Tests
|
|
on: [push, pull_request]
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
|
|
|
- name: Setup Go Version
|
|
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
id: go
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
|
run: |
|
|
( cd request; go test -race ./... )
|
|
( cd core; go test -race ./... )
|
|
( cd coremain; go test -race ./... )
|
|
|
|
test-plugins:
|
|
name: Test Plugins
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
|
|
|
- name: Setup Go Version
|
|
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
id: go
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
|
run: ( cd plugin; go test -race ./... )
|
|
|
|
test-e2e:
|
|
name: Test e2e
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
|
|
with:
|
|
go-version: '~1.21.0'
|
|
id: go
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
|
run: |
|
|
go install github.com/fatih/faillint@latest
|
|
( cd test; go test -race ./... )
|
|
|
|
test-makefile-release:
|
|
name: Test Makefile.release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
|
|
|
- name: Install dependencies
|
|
run: sudo apt-get install make curl
|
|
|
|
- name: Test Makefile.release
|
|
run: make GITHUB_ACCESS_TOKEN=x -n release github-push -f Makefile.release
|
|
|
|
- name: Test Makefile.docker
|
|
run: make VERSION=x DOCKER=x -n release docker-push -f Makefile.docker
|