mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2026-04-15 21:11:01 +02:00
Pin all uses: references in workflow files to 40-character commit SHA hashes instead of mutable tags, as required by the Kubernetes GitHub Actions security policy. Actions pinned: - actions/setup-go v6.3.0 - actions/setup-python v6 - actions/checkout v6 - coverallsapp/github-action v2 - github/codeql-action v4 - golangci/golangci-lint-action v9 - GrantBirki/json-yaml-validate v4.0.0 - nosborn/github-action-markdown-cli v3.5.0 - pre-commit/action v3.0.1 - renovatebot/github-action v46.1.4
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
|
|
test:
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
checks: write # to create a new check based on the results (shogo82148/actions-goveralls)
|
|
|
|
name: Test
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
# tests for target OS
|
|
os: [ubuntu-latest, macos-latest]
|
|
steps:
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
id: go
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
go get -v -t -d ./...
|
|
|
|
- name: Test
|
|
env:
|
|
GOMAXPROCS: 4
|
|
GOMEMLIMIT: 8192MiB
|
|
run: make go-test
|
|
|
|
- name: Send coverage
|
|
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2
|
|
with:
|
|
file: profile.cov
|
|
format: golang
|
|
flag-name: run-${{ join(matrix.*, '-') }}
|
|
parallel: true
|
|
continue-on-error: true
|
|
|
|
finish:
|
|
needs: test
|
|
if: ${{ always() }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Coveralls Finished
|
|
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2
|
|
with:
|
|
parallel-finished: true
|
|
carryforward: "run-ubuntu-latest,run-macos-latest"
|
|
continue-on-error: true
|