Skip to content

Bump the go_modules group across 1 directory with 6 updates #44

Bump the go_modules group across 1 directory with 6 updates

Bump the go_modules group across 1 directory with 6 updates #44

Workflow file for this run

name: Go
on:
workflow_dispatch:
push:
branches: [ "*" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
generate:
runs-on: ubuntu-latest
name: Ensure manifests are commit
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Generate manifests
run: make manifests
- name: Run code generation
run: make generate
- name: Verify modified files
uses: tj-actions/[email protected]
id: verify-changed-files
with:
files: |
config/crd/bases/*.yaml
api
internal/putio/putio_generated.go
- name: Validate generated files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}"
echo "Run 'make manifests generate && go generate ./...' and commit again'
exit 1
unit-tests:
runs-on: ubuntu-latest
name: Go tests
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
check-latest: true
cache: true
- name: Run tests
run: make test
env:
PUTIO_TESTING_OAUTH_TOKEN: ${{ secrets.PUTIO_TESTING_OAUTH_TOKEN }}
ACK_GINKGO_DEPRECATIONS: "1.16.5"
lint:
runs-on: ubuntu-latest
name: Go lint
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
check-latest: true
cache: false # golangci/golangci-lint-action already do some caching
- name: Checkout code
uses: actions/checkout@v3
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.50.0
build:
runs-on: ubuntu-latest
name: Go build
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
check-latest: true
cache: true
- name: Build
run: make build