mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
131 lines
3.4 KiB
YAML
131 lines
3.4 KiB
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
conditional-changes:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
pull-requests: read
|
|
outputs:
|
|
doc: ${{ steps.filter.outputs.doc }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
doc:
|
|
- 'site/**'
|
|
|
|
check-modules:
|
|
name: check-synced-go-modules
|
|
needs: conditional-changes
|
|
# if: needs.conditional-changes.outputs.doc == 'false'
|
|
runs-on: [ubuntu-latest]
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.work
|
|
id: go
|
|
- name: sync go modules
|
|
run: make workspace-sync
|
|
- name: check for changes with 'make workspace-sync'
|
|
run: git diff --exit-code
|
|
|
|
lint:
|
|
name: Lint
|
|
needs: conditional-changes
|
|
# if: needs.conditional-changes.outputs.doc == 'false'
|
|
runs-on: [ubuntu-latest]
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.work
|
|
id: go
|
|
- name: Lint
|
|
run: make lint
|
|
- name: Verify boilerplate
|
|
run: make check-license
|
|
|
|
test-linux:
|
|
name: Test Linux
|
|
needs: conditional-changes
|
|
# if: needs.conditional-changes.outputs.doc == 'false'
|
|
runs-on: [ubuntu-latest]
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v5
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.work
|
|
id: go
|
|
- name: Test all modules
|
|
run: make test-unit-non-plugin
|
|
env:
|
|
KUSTOMIZE_DOCKER_E2E: true
|
|
|
|
test-macos:
|
|
name: Test MacOS
|
|
needs: conditional-changes
|
|
# if: needs.conditional-changes.outputs.doc == 'false'
|
|
runs-on: [macos-latest]
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v5
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.work
|
|
id: go
|
|
- name: Test all modules
|
|
run: make test-unit-non-plugin
|
|
env:
|
|
KUSTOMIZE_DOCKER_E2E: false # docker not installed on mac
|
|
|
|
test-windows:
|
|
name: Test Windows
|
|
needs: conditional-changes
|
|
# if: needs.conditional-changes.outputs.doc == 'false'
|
|
runs-on: [windows-latest]
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v5
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.work
|
|
id: go
|
|
- name: Test kyaml
|
|
run: go test -cover ./...
|
|
working-directory: ./kyaml
|
|
- name: Test cmd/config
|
|
run: go test -cover ./...
|
|
working-directory: ./cmd/config
|
|
env:
|
|
KUSTOMIZE_DOCKER_E2E: false # docker on windows not working well yet
|
|
|
|
# TODO (#4001): replace specific modules above with this once Windows tests are passing.
|
|
#- name: Test all modules
|
|
# run: make test-unit-non-plugin
|
|
# env:
|
|
# KUSTOMIZE_DOCKER_E2E: false # docker on windows not working well yet
|