rename sandbox.yaml to ksctl.yaml #3
Workflow file for this run
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: ci-build | |
on: | |
push: | |
branches: | |
- master | |
tags-ignore: | |
- '*.*' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
name: Test on ${{ matrix.os }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.20.x | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles ('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Build | |
run: | | |
make build | |
- name: Test | |
run: | | |
make test-with-coverage | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./out/coverage/coverage.txt | |
flags: unittests # optional | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
golangci: | |
name: GolangCI Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.20.x | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: v1.56.2 | |
skip-pkg-cache: true | |
skip-build-cache: true | |
args: --config=./.golangci.yml --verbose | |
yammlint: | |
name: YAML Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install yamllint | |
run: pip install yamllint | |
- name: Lint YAML files | |
run: yamllint -c .yamllint ./ |