Skip to content

Add ConvertCPUSharesToCPUWeight #33

Add ConvertCPUSharesToCPUWeight

Add ConvertCPUSharesToCPUWeight #33

Workflow file for this run

name: validate
on:
push:
tags:
- v*
branches:
- main
- release-*
pull_request:
env:
GO_VERSION: 1.24
permissions:
contents: read
jobs:
lint:
timeout-minutes: 30
permissions:
contents: read
pull-requests: read
checks: write # to allow the action to annotate code in the PR.
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
- uses: golangci/golangci-lint-action@v7
with:
version: v2.0
# Extra linters, only checking new code from a pull request.
- name: lint-extra
if: github.event_name == 'pull_request'
run: |
golangci-lint run --config .golangci-extra.yml --new-from-rev=HEAD~1
go-fix:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
- name: run go fix
run: |
go fix ./...
git diff --exit-code
codespell:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: install deps
# Use a known version of codespell.
run: pip install --break-system-packages codespell==v2.4.1
- name: run codespell
run: codespell
space-at-eol:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: if git -P grep -I -n '\s$'; then echo "^^^ extra whitespace at EOL, please fix"; exit 1; fi
deps:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
- run: go mod tidy --diff
all-done:
needs:
- codespell
- deps
- go-fix
- lint
- space-at-eol
runs-on: ubuntu-24.04
steps:
- run: echo "All jobs completed"