diff --git a/.github/workflows/test-exercises.yml b/.github/workflows/test-exercises.yml index d7e5707d..d47282ba 100644 --- a/.github/workflows/test-exercises.yml +++ b/.github/workflows/test-exercises.yml @@ -15,6 +15,18 @@ concurrency: cancel-in-progress: true jobs: + verify-licenses: + runs-on: ubuntu-latest + name: Validate that all files have copyright and license info + steps: + - uses: actions/checkout@v6 + - name: Install REUSE + run: | + ./CI/setup-uv.sh + uv pip install reuse + - name: Validate presence of copyright and license info (python w/reuse) + run: | + uv run reuse lint test-exercise: timeout-minutes: 30 runs-on: ubuntu-latest diff --git a/CI/setup-uv.sh b/CI/setup-uv.sh new file mode 100755 index 00000000..2d24c3b6 --- /dev/null +++ b/CI/setup-uv.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +# SPDX-FileCopyrightText: 2026 Andy Fingerhut +# +# SPDX-License-Identifier: Apache-2.0 + +sudo apt-get update +# Set up uv for Python dependency management. +# TODO: Consider using a system-provided package here. +sudo apt-get install -y curl +curl -LsSf https://astral.sh/uv/0.6.12/install.sh | sh +# Ensure uv is in the PATH +export PATH="${PATH}:$HOME/.local/bin" +# Create a venv for use by uv, without needing a pyproject.toml file for the project. +uv venv +uv tool update-shell