-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: set PKG_NAME environment variable
Set PKG_NAME environment variable. This allows to validate extensions. Signed-off-by: Noel Georgi <[email protected]>
- Loading branch information
Showing
15 changed files
with
291 additions
and
189 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-03-05T05:52:53Z by kres latest. | ||
# Generated on 2024-05-23T12:22:27Z by kres 2688b70. | ||
|
||
name: default | ||
concurrency: | ||
|
@@ -29,27 +29,44 @@ jobs: | |
- self-hosted | ||
- generic | ||
if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/')) | ||
services: | ||
buildkitd: | ||
image: moby/buildkit:v0.12.5 | ||
options: --privileged | ||
ports: | ||
- 1234:1234 | ||
volumes: | ||
- /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit | ||
- /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml | ||
steps: | ||
- name: gather-system-info | ||
id: system-info | ||
uses: kenchan0130/[email protected] | ||
continue-on-error: true | ||
- name: print-system-info | ||
run: | | ||
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024)) | ||
OUTPUTS=( | ||
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}" | ||
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}" | ||
"Hostname: ${{ steps.system-info.outputs.hostname }}" | ||
"NodeName: ${NODE_NAME}" | ||
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}" | ||
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}" | ||
"Name: ${{ steps.system-info.outputs.name }}" | ||
"Platform: ${{ steps.system-info.outputs.platform }}" | ||
"Release: ${{ steps.system-info.outputs.release }}" | ||
"Total memory: ${MEMORY_GB} GB" | ||
) | ||
for OUTPUT in "${OUTPUTS[@]}";do | ||
echo "${OUTPUT}" | ||
done | ||
continue-on-error: true | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Unshallow | ||
run: | | ||
git fetch --prune --unshallow | ||
- name: Set up Docker Buildx | ||
id: setup-buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver: remote | ||
endpoint: tcp://localhost:1234 | ||
timeout-minutes: 1 | ||
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234 | ||
timeout-minutes: 10 | ||
- name: base | ||
run: | | ||
make base | ||
|
@@ -60,8 +77,11 @@ jobs: | |
run: | | ||
make unit-tests-race | ||
- name: coverage | ||
run: | | ||
make coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: _out/coverage-unit-tests.txt | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
timeout-minutes: 3 | ||
- name: bldr | ||
run: | | ||
make bldr | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"gopls": { | ||
"build.buildFlags": [ | ||
"-tags=integration", | ||
] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
# syntax = docker/dockerfile-upstream:1.7.0-labs | ||
# syntax = docker/dockerfile-upstream:1.7.1-labs | ||
|
||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-03-06T10:32:46Z by kres latest. | ||
# Generated on 2024-05-23T12:22:27Z by kres 2688b70. | ||
|
||
ARG TOOLCHAIN | ||
|
||
FROM ghcr.io/siderolabs/ca-certificates:v1.6.0 AS image-ca-certificates | ||
FROM ghcr.io/siderolabs/ca-certificates:v1.7.0 AS image-ca-certificates | ||
|
||
FROM ghcr.io/siderolabs/fhs:v1.6.0 AS image-fhs | ||
FROM ghcr.io/siderolabs/fhs:v1.7.0 AS image-fhs | ||
|
||
# runs markdownlint | ||
FROM docker.io/node:21.6.2-alpine3.19 AS lint-markdown | ||
FROM docker.io/node:22.2.0-alpine3.19 AS lint-markdown | ||
WORKDIR /src | ||
RUN npm i -g markdownlint-cli@0.39.0 | ||
RUN npm i -g markdownlint-cli@0.40.0 | ||
RUN npm i [email protected] | ||
COPY .markdownlint.json . | ||
COPY ./CHANGELOG.md ./CHANGELOG.md | ||
COPY ./README.md ./README.md | ||
RUN markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js . | ||
|
||
# base toolchain image | ||
FROM ${TOOLCHAIN} AS toolchain | ||
FROM --platform=${BUILDPLATFORM} ${TOOLCHAIN} AS toolchain | ||
RUN apk --update --no-cache add bash curl build-base protoc protobuf-dev | ||
|
||
# build tools | ||
|
@@ -42,9 +42,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g | |
&& mv /go/bin/golangci-lint /bin/golangci-lint | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \ | ||
&& mv /go/bin/govulncheck /bin/govulncheck | ||
ARG GOIMPORTS_VERSION | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/tools/cmd/goimports@${GOIMPORTS_VERSION} \ | ||
&& mv /go/bin/goimports /bin/goimports | ||
ARG GOFUMPT_VERSION | ||
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \ | ||
&& mv /go/bin/gofumpt /bin/gofumpt | ||
|
@@ -81,15 +78,12 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g | |
FROM base AS lint-gofumpt | ||
RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'gofumpt -w .':\n${FILES}"; exit 1) | ||
|
||
# runs goimports | ||
FROM base AS lint-goimports | ||
RUN FILES="$(goimports -l -local github.com/siderolabs/bldr/ .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/siderolabs/bldr/ .':\n${FILES}"; exit 1) | ||
|
||
# runs golangci-lint | ||
FROM base AS lint-golangci-lint | ||
WORKDIR /src | ||
COPY .golangci.yml . | ||
ENV GOGC 50 | ||
RUN golangci-lint config verify --config .golangci.yml | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint --mount=type=cache,target=/go/pkg golangci-lint run --config .golangci.yml | ||
|
||
# runs govulncheck | ||
|
Oops, something went wrong.