Skip to content

Commit 3e9306d

Browse files
authored
Use REUSE to validate presence of file copyrights and licenses in CI (#739)
* Move optional steps for testing VMs out of README.md file This may help avoid new users being confused that they must follow those instructions. Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> * Add 2025-Jan-30 versions of source code for install.sh Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> * Use REUSE to validate presence of file copyrights and licenses in CI Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> * Try using `uv venv` instead of `uv sync` Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> * Add copyright & license info for new file Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> --------- Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
1 parent dbc31fb commit 3e9306d

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/test-exercises.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18+
verify-licenses:
19+
runs-on: ubuntu-latest
20+
name: Validate that all files have copyright and license info
21+
steps:
22+
- uses: actions/checkout@v6
23+
- name: Install REUSE
24+
run: |
25+
./CI/setup-uv.sh
26+
uv pip install reuse
27+
- name: Validate presence of copyright and license info (python w/reuse)
28+
run: |
29+
uv run reuse lint
1830
test-exercise:
1931
timeout-minutes: 30
2032
runs-on: ubuntu-latest

CI/setup-uv.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#! /bin/bash
2+
3+
# SPDX-FileCopyrightText: 2026 Andy Fingerhut
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
sudo apt-get update
8+
# Set up uv for Python dependency management.
9+
# TODO: Consider using a system-provided package here.
10+
sudo apt-get install -y curl
11+
curl -LsSf https://astral.sh/uv/0.6.12/install.sh | sh
12+
# Ensure uv is in the PATH
13+
export PATH="${PATH}:$HOME/.local/bin"
14+
# Create a venv for use by uv, without needing a pyproject.toml file for the project.
15+
uv venv
16+
uv tool update-shell

0 commit comments

Comments
 (0)