Skip to content

Make sure controller and tests shut down cleanly #642

Make sure controller and tests shut down cleanly

Make sure controller and tests shut down cleanly #642

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
paths-ignore:
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
- "charts/**"
- "docs/**"
- "hack/**"
- "*.md"
pull_request_target:
types:
- closed
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read # for actions/checkout to fetch code
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
cache: true
- name: Prepare
run: |
echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" > ~/.netrc
- name: Lint
run: make lint
lint-chart:
runs-on: ubuntu-latest
steps:
- run: 'echo "No lint for Helm chart required"'
verify-tidy:
runs-on: ubuntu-latest
permissions:
contents: read # for actions/checkout to fetch code
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
cache: true
- name: Prepare
run: |
echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" > ~/.netrc
- name: Verify
run: make verify-tidy
test:
runs-on: ubuntu-latest
permissions:
contents: read # for actions/checkout to fetch code
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
cache: true
- name: Prepare
run: |
echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" > ~/.netrc
- name: Test
run: make test
build:
runs-on: ubuntu-latest
permissions:
contents: read # for actions/checkout to fetch code
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
cache: true
- name: Prepare # .netrc is used by docker-build, ~/.netrc is used by go test
run: echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" | tee ~/.netrc .netrc
- name: Build
run: make docker-build