From 809c3083e742eb702f3b559592b795fbf336d187 Mon Sep 17 00:00:00 2001 From: Qiheng He Date: Fri, 9 Oct 2026 13:11:01 +0800 Subject: [PATCH] Enforce license headers with `license-eye` --- .github/workflows/license.yml | 23 +++++++++ .license.tpl | 13 +++++ .licenserc.yaml | 59 ++++++++++++++++++++++ Injection.lua | 14 +++++ docs/e2e.md | 43 +++++++++++++--- hooks/available.lua | 14 +++++ hooks/env_keys.lua | 14 +++++ hooks/pre_install.lua | 14 +++++ hooks/pre_use.lua | 14 +++++ lib/git.lua | 14 +++++ lib/manifest.lua | 14 +++++ lib/ohos.lua | 14 +++++ lib/source.lua | 14 +++++ lib/util.lua | 14 +++++ metadata.lua | 14 +++++ tests/e2e/common/common.go | 14 +++++ tests/e2e/common/common_test.go | 14 +++++ tests/e2e/common/retry.go | 14 +++++ tests/e2e/common/retry_test.go | 14 +++++ tests/e2e/doc.go | 14 +++++ tests/e2e/linux/e2e_test.go | 14 +++++ tests/e2e/linux/exec.go | 14 +++++ tests/e2e/linux/install.go | 14 +++++ tests/e2e/linux/matrix_test.go | 14 +++++ tests/e2e/linux/platform.go | 14 +++++ tests/e2e/linux/setup.go | 14 +++++ tests/e2e/linux/verify.go | 14 +++++ tests/e2e/windows/bootstrap-tools.ps1 | 16 ++++++ tests/e2e/windows/e2e_test.go | 14 +++++ tests/e2e/windows/exec.go | 14 +++++ tests/e2e/windows/install-docker-arm64.ps1 | 16 ++++++ tests/e2e/windows/install.go | 14 +++++ tests/e2e/windows/matrix_test.go | 14 +++++ tests/e2e/windows/platform.go | 14 +++++ tests/e2e/windows/setup.go | 14 +++++ tests/e2e/windows/verify.go | 14 +++++ tests/hooks_test.lua | 14 +++++ 37 files changed, 597 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/license.yml create mode 100644 .license.tpl create mode 100644 .licenserc.yaml diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml new file mode 100644 index 0000000..4f7b994 --- /dev/null +++ b/.github/workflows/license.yml @@ -0,0 +1,23 @@ +name: License + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + pull-requests: write + +jobs: + license-eye: + if: github.repository == 'version-fox/vfox-flutter' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: Check license headers + uses: apache/skywalking-eyes@v0.9.0 + with: + config: .licenserc.yaml + - name: Check PowerShell license headers + run: docker run --rm -v "${{ github.workspace }}:/src" ghcr.io/google/addlicense:v1.2.0 -check -f .license.tpl tests/e2e/windows/*.ps1 diff --git a/.license.tpl b/.license.tpl new file mode 100644 index 0000000..70038c7 --- /dev/null +++ b/.license.tpl @@ -0,0 +1,13 @@ +Copyright 2026 Han Li and contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/.licenserc.yaml b/.licenserc.yaml new file mode 100644 index 0000000..65178ae --- /dev/null +++ b/.licenserc.yaml @@ -0,0 +1,59 @@ +# Copyright 2026 Han Li and contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# License header check (Apache SkyWalking Eyes): Go and Lua are both covered. +# PowerShell is check-only here (no `<# ... #>` fix support upstream): +# tests/e2e/windows/*.ps1 is fixed and checked with addlicense instead (see +# the addlicense step in .github/workflows/license.yml and docs/e2e.md). +# CI runs the check via .github/workflows/license.yml; the local commands +# (Docker only) are documented in docs/e2e.md. +header: + license: + spdx-id: Apache-2.0 + copyright-owner: Han Li and contributors + content: | + Copyright 2026 Han Li and contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + paths-ignore: + # Documentation and data files carry no license header. + - '**/*.md' + - '**/*.yaml' + - '**/*.yml' + - '**/*.json' + - '**/*.toml' + - '**/go.mod' + - '**/go.sum' + - '**/Dockerfile*' + - '.gitignore' + - '.gitattributes' + - '.dockerignore' + - '.tool-versions' + - 'LICENSE' + # Plain-text template for addlicense (no comment markers in it; keep its + # text in sync with the `content` block above). + - '.license.tpl' + + comment: on-failure diff --git a/Injection.lua b/Injection.lua index 533f8c5..466ade8 100644 --- a/Injection.lua +++ b/Injection.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + --[[ Do not change any thing in the current file, it's just there to show what objects are injected by vfox and what they do. diff --git a/docs/e2e.md b/docs/e2e.md index b2c5291..695428c 100644 --- a/docs/e2e.md +++ b/docs/e2e.md @@ -6,8 +6,14 @@ each `vfox` x `flavor` x `mirror` combination gets its own throwaway container. ## Ubuntu 26.04.1 -Only Docker Engine (in either rootful or rootless mode) is required on the -host. Execute in Bash, +Only Docker Engine (in either rootful or rootless mode) is required on the host. +On ARM64 it runs the official flavor only: +OpenHarmony publishes no `linux-arm64` Dart SDK (see `docs/ohos.md`), +so the ohos flavor cannot bootstrap there. + +### rootful Docker + +Execute in Bash, ```bash sudo apt install --assume-yes git @@ -16,17 +22,18 @@ cd ./vfox-flutter/ docker compose -f tests/e2e/linux/compose.yaml run --rm e2e ``` +### rootless Docker + With rootless Docker the daemon socket lives elsewhere; point `DOCKER_SOCK` at it instead: ```bash -DOCKER_SOCK="$XDG_RUNTIME_DIR/docker.sock" \ - docker compose -f tests/e2e/linux/compose.yaml run --rm e2e +sudo apt install --assume-yes git +git clone git@github.com:version-fox/vfox-flutter.git +cd ./vfox-flutter/ +DOCKER_SOCK="$XDG_RUNTIME_DIR/docker.sock" docker compose -f tests/e2e/linux/compose.yaml run --rm e2e ``` -On ARM64 it runs the official flavor only: OpenHarmony publishes no `linux-arm64` Dart SDK (see `docs/ohos.md`), so the -ohos flavor cannot bootstrap there. - ## Windows 11 Pro Windows containers cannot be emulated across architectures, so the ARM64 suite @@ -47,6 +54,7 @@ winget install --id Microsoft.PowerShell --source winget --exact ```powershell winget install --id Git.Git --source winget --exact +# Configure Git appropriately. curl.exe -fsSL ` "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" ` @@ -85,6 +93,7 @@ winget install --id Microsoft.PowerShell --source winget --exact ```powershell winget install --id Git.Git --source winget --exact +# Configure Git appropriately. winget install --id GoLang.Go --source winget --exact git clone git@github.com:version-fox/vfox-flutter.git cd ./vfox-flutter/ @@ -97,3 +106,23 @@ curl.exe -fsSL ` docker compose -f tests/e2e/windows/compose.arm64.yaml run --rm --build e2e ``` + +## Local checks + +Execute in Bash on Ubuntu before pushing. + +```bash +docker run --rm -v "$PWD:/work" -w /work apache/skywalking-eyes:0.9.0 header check +docker run --rm -v "$PWD:/work" -w /work apache/skywalking-eyes:0.9.0 header fix +docker run --rm -v "$PWD:/src" ghcr.io/google/addlicense:v1.2.0 -check -f .license.tpl tests/e2e/windows/*.ps1 +docker run --rm -v "$PWD:/src" ghcr.io/google/addlicense:v1.2.0 -f .license.tpl tests/e2e/windows/*.ps1 + +cd tests/e2e +go test -short ./... +test -z "$(gofmt -l .)" +go vet ./... +cd ../.. + +stylua --check . +mise x aqua:LuaLS/lua-language-server@3.19.1 -- lua-language-server --check . --checklevel=Warning +``` diff --git a/hooks/available.lua b/hooks/available.lua index 8e77166..2cb9c8c 100644 --- a/hooks/available.lua +++ b/hooks/available.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + local http = require("http") local json = require("json") local ohos = require("ohos") diff --git a/hooks/env_keys.lua b/hooks/env_keys.lua index 3a62cb8..69741e3 100644 --- a/hooks/env_keys.lua +++ b/hooks/env_keys.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + function PLUGIN:EnvKeys(ctx) local mainPath = ctx.path return { diff --git a/hooks/pre_install.lua b/hooks/pre_install.lua index 1a47e29..40d4444 100644 --- a/hooks/pre_install.lua +++ b/hooks/pre_install.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + local http = require("http") local json = require("json") local manifest = require("manifest") diff --git a/hooks/pre_use.lua b/hooks/pre_use.lua index 280c973..ac6079f 100644 --- a/hooks/pre_use.lua +++ b/hooks/pre_use.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + local manifest = require("manifest") local REASON = { diff --git a/lib/git.lua b/lib/git.lua index acc3ab8..7a6b9f8 100644 --- a/lib/git.lua +++ b/lib/git.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + local HOME_ENV = "VFOX_HOME" local FALLBACK_HOME_ENV = { "HOME", "USERPROFILE" } local VFOX_DIR = ".vfox" diff --git a/lib/manifest.lua b/lib/manifest.lua index 54c7710..fa50a15 100644 --- a/lib/manifest.lua +++ b/lib/manifest.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + local json = require("json") local MARKER = ".vfox-manifest" diff --git a/lib/ohos.lua b/lib/ohos.lua index d82cbf5..7fa588f 100644 --- a/lib/ohos.lua +++ b/lib/ohos.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + local http = require("http") local json = require("json") local git = require("git") diff --git a/lib/source.lua b/lib/source.lua index 25519a8..722c997 100644 --- a/lib/source.lua +++ b/lib/source.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + local git = require("git") local REPO = "flutter/flutter" diff --git a/lib/util.lua b/lib/util.lua index 7dff8a4..d439b3d 100644 --- a/lib/util.lua +++ b/lib/util.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + local DEFAULT_STORAGE_BASE_URL = "https://storage.googleapis.com" function sleep(seconds) diff --git a/metadata.lua b/metadata.lua index 3169e3a..6b0e20b 100644 --- a/metadata.lua +++ b/metadata.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + --- !!! DO NOT EDIT OR RENAME !!! PLUGIN = {} diff --git a/tests/e2e/common/common.go b/tests/e2e/common/common.go index 72254bc..f1dbb0d 100644 --- a/tests/e2e/common/common.go +++ b/tests/e2e/common/common.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package common holds the shared logic of the Linux and Windows container // E2E suites. // diff --git a/tests/e2e/common/common_test.go b/tests/e2e/common/common_test.go index b46bc28..ac4d9b0 100644 --- a/tests/e2e/common/common_test.go +++ b/tests/e2e/common/common_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package common import ( diff --git a/tests/e2e/common/retry.go b/tests/e2e/common/retry.go index 7599fa5..86e26af 100644 --- a/tests/e2e/common/retry.go +++ b/tests/e2e/common/retry.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Retry helpers shared by the Linux and Windows container suites. // // Both suites shell out into throwaway containers where downloads and diff --git a/tests/e2e/common/retry_test.go b/tests/e2e/common/retry_test.go index 52e5e4f..fbea965 100644 --- a/tests/e2e/common/retry_test.go +++ b/tests/e2e/common/retry_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package common import ( diff --git a/tests/e2e/doc.go b/tests/e2e/doc.go index 4c3cc11..4cabc07 100644 --- a/tests/e2e/doc.go +++ b/tests/e2e/doc.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package e2e is the single Go module root of the container E2E suites. // // This directory holds no test logic, only the module definition diff --git a/tests/e2e/linux/e2e_test.go b/tests/e2e/linux/e2e_test.go index f392319..e4fec3e 100644 --- a/tests/e2e/linux/e2e_test.go +++ b/tests/e2e/linux/e2e_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package linux is the Linux container E2E suite, driven entirely from Go via // testcontainers-go. // diff --git a/tests/e2e/linux/exec.go b/tests/e2e/linux/exec.go index 7c2fa54..f3e1219 100644 --- a/tests/e2e/linux/exec.go +++ b/tests/e2e/linux/exec.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package linux import ( diff --git a/tests/e2e/linux/install.go b/tests/e2e/linux/install.go index c13ac71..6c661cd 100644 --- a/tests/e2e/linux/install.go +++ b/tests/e2e/linux/install.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package linux import ( diff --git a/tests/e2e/linux/matrix_test.go b/tests/e2e/linux/matrix_test.go index a2ad045..85dda8c 100644 --- a/tests/e2e/linux/matrix_test.go +++ b/tests/e2e/linux/matrix_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package linux import ( diff --git a/tests/e2e/linux/platform.go b/tests/e2e/linux/platform.go index 289075d..77d0509 100644 --- a/tests/e2e/linux/platform.go +++ b/tests/e2e/linux/platform.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package linux import ( diff --git a/tests/e2e/linux/setup.go b/tests/e2e/linux/setup.go index e2a2a3b..7271b46 100644 --- a/tests/e2e/linux/setup.go +++ b/tests/e2e/linux/setup.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package linux import ( diff --git a/tests/e2e/linux/verify.go b/tests/e2e/linux/verify.go index d69d82a..4c7d375 100644 --- a/tests/e2e/linux/verify.go +++ b/tests/e2e/linux/verify.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package linux import ( diff --git a/tests/e2e/windows/bootstrap-tools.ps1 b/tests/e2e/windows/bootstrap-tools.ps1 index f0fcea5..5bc4d34 100644 --- a/tests/e2e/windows/bootstrap-tools.ps1 +++ b/tests/e2e/windows/bootstrap-tools.ps1 @@ -1,3 +1,19 @@ +<# + Copyright 2026 Han Li and contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#> + $ErrorActionPreference = 'Stop' # Local copy of the native-command guard (the e2e/lib.ps1 helper is gone; diff --git a/tests/e2e/windows/e2e_test.go b/tests/e2e/windows/e2e_test.go index f58a541..a4e3f0a 100644 --- a/tests/e2e/windows/e2e_test.go +++ b/tests/e2e/windows/e2e_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package windows is the Windows container E2E suite, driven entirely from // Go via testcontainers-go. // diff --git a/tests/e2e/windows/exec.go b/tests/e2e/windows/exec.go index c99051c..a32d5d7 100644 --- a/tests/e2e/windows/exec.go +++ b/tests/e2e/windows/exec.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package windows import ( diff --git a/tests/e2e/windows/install-docker-arm64.ps1 b/tests/e2e/windows/install-docker-arm64.ps1 index 2f16456..a4b7160 100644 --- a/tests/e2e/windows/install-docker-arm64.ps1 +++ b/tests/e2e/windows/install-docker-arm64.ps1 @@ -1,3 +1,19 @@ +<# + Copyright 2026 Han Li and contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#> + $ErrorActionPreference = 'Stop' $PSNativeCommandUseErrorActionPreference = $true diff --git a/tests/e2e/windows/install.go b/tests/e2e/windows/install.go index 86e50aa..1941456 100644 --- a/tests/e2e/windows/install.go +++ b/tests/e2e/windows/install.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package windows import ( diff --git a/tests/e2e/windows/matrix_test.go b/tests/e2e/windows/matrix_test.go index 680cd71..857c144 100644 --- a/tests/e2e/windows/matrix_test.go +++ b/tests/e2e/windows/matrix_test.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package windows import ( diff --git a/tests/e2e/windows/platform.go b/tests/e2e/windows/platform.go index c2d0f1e..4ade351 100644 --- a/tests/e2e/windows/platform.go +++ b/tests/e2e/windows/platform.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package windows import ( diff --git a/tests/e2e/windows/setup.go b/tests/e2e/windows/setup.go index 68d5224..bfe62d9 100644 --- a/tests/e2e/windows/setup.go +++ b/tests/e2e/windows/setup.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package windows import ( diff --git a/tests/e2e/windows/verify.go b/tests/e2e/windows/verify.go index 810cece..a15822f 100644 --- a/tests/e2e/windows/verify.go +++ b/tests/e2e/windows/verify.go @@ -1,3 +1,17 @@ +// Copyright 2026 Han Li and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package windows import ( diff --git a/tests/hooks_test.lua b/tests/hooks_test.lua index 3fba29e..8fb6373 100644 --- a/tests/hooks_test.lua +++ b/tests/hooks_test.lua @@ -1,3 +1,17 @@ +-- Copyright 2026 Han Li and contributors +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + package.path = "./lib/?.lua;" .. package.path local fixture, requests, mirror