chore(deps): update manusa/actions-setup-minikube action to v2.11.0 #235
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push/PR pipeline | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
workflow_dispatch: | |
env: | |
INTEGRATION: "discovery-kubernetes" | |
ORIGINAL_REPO_NAME: 'newrelic/nri-discovery-kubernetes' | |
REPO_FULL_NAME: ${{ github.event.repository.full_name }} | |
TAG: "v1.2.3" # needed for fake-prereleases | |
jobs: | |
static-analysis: | |
name: Run all static analysis | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- uses: newrelic/newrelic-infra-checkers@v1 | |
with: | |
golangci-lint-config: golangci-lint-limited | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v5 | |
continue-on-error: ${{ github.event_name != 'pull_request' }} | |
with: | |
only-new-issues: true | |
skip-cache: true | |
- name: Check if CHANGELOG is valid | |
uses: newrelic/release-toolkit/validate-markdown@v1 | |
test-nix: | |
name: Run unit tests on *Nix | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Unit tests | |
run: make ci/test | |
test-windows: | |
name: Run unit tests on Windows | |
runs-on: windows-latest | |
env: | |
GOPATH: ${{ github.workspace }} | |
defaults: | |
run: | |
working-directory: src/github.com/${{env.ORIGINAL_REPO_NAME}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: src/github.com/${{env.ORIGINAL_REPO_NAME}} | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: "src/github.com/${{env.ORIGINAL_REPO_NAME}}/go.mod" | |
- name: Running unit tests | |
shell: pwsh | |
run: | | |
.\build\windows\unit_tests.ps1 | |
e2eTests: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 3 # len(k8sVersion)/2 is a good number to have here | |
matrix: | |
# Latest patch version can be found in https://github.com/kubernetes/website/blob/main/content/en/releases/patch-releases.md | |
# Some versions might not be available yet in https://storage.googleapis.com/kubernetes-release/release/v1.X.Y/bin/linux/amd64/kubelet | |
# We are maintaining the same kubernetes versions that (as of today) the Kubernetes team supports: | |
# https://github.com/newrelic/nri-kubernetes/blob/main/.github/workflows/e2e.yaml#L21 | |
k8sVersion: [ "v1.26.0","v1.25.3", "v1.24.1", "v1.23.8", "v1.22.11", "v1.21.14" ] | |
cri: [ containerd ] | |
exclude: | |
- k8sVersion: v1.23.8 | |
cri: containerd | |
- k8sVersion: v1.22.11 | |
cri: containerd | |
- k8sVersion: v1.21.14 | |
cri: containerd | |
include: | |
- k8sVersion: v1.23.8 | |
cri: docker | |
- k8sVersion: v1.22.11 | |
cri: docker | |
- k8sVersion: v1.21.14 | |
cri: docker | |
env: | |
DOCKER_BUILDKIT: '1' # Setting DOCKER_BUILDKIT=1 ensures TARGETOS and TARGETARCH are populated | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Setup Minikube | |
uses: manusa/actions-setup-minikube@v2.11.0 | |
with: | |
minikube version: v1.29.0 | |
kubernetes version: ${{ matrix.k8sVersion }} | |
github token: ${{ secrets.GITHUB_TOKEN }} | |
driver: docker | |
start args: "--container-runtime=${{ matrix.cri }}" | |
- name: Run Integration Tests | |
run: make test-integration | |
fake-prerelease: | |
name: Fakes the prerelease, making all the steps of a prerelease without uploading the assets to the Github release | |
runs-on: ubuntu-latest | |
needs: [test-nix, test-windows] | |
env: | |
GPG_MAIL: 'infrastructure-eng@newrelic.com' | |
GPG_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }} | |
GPG_PRIVATE_KEY_BASE64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
git tag "$TAG" | |
if [ -z "$GPG_PASSPHRASE" ]; then | |
echo NO_SIGN=true >> $GITHUB_ENV | |
fi | |
- name: Pre release | |
run: make ci/fake-prerelease |