Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/pr_lint_gha.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: GitHub Actions

on:
workflow_dispatch:
pull_request:
branches: ["**"]
paths:
- ".github/**.yaml"
- ".github/**.yml"

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Install actionlint
run: bash <(curl -s https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)

- name: Run actionlint
run: ./actionlint -ignore SC2086
47 changes: 47 additions & 0 deletions .github/workflows/pr_lint_license.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Check License

on:
workflow_dispatch:
pull_request:
branches: ["**"]
paths:
- "**/Cargo.toml"
- "LICENSE*"
- ".github/workflows/pr_lint_license.yaml"

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
check-license:
name: Verify License
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Check LICENSE file exists
run: |
if [ ! -f LICENSE ]; then
echo "::error::LICENSE file is missing"
exit 1
fi
echo "License file present"

- name: Check all packages reference LICENSE
run: |
MISSING=$(cargo metadata --format-version 1 --no-deps 2>/dev/null | \
jq -r '.packages[] | select(.license != "LICENSE") | .name')

if [ -n "$MISSING" ]; then
echo "::error::The following packages do not reference 'LICENSE':"
echo "$MISSING"
echo ""
echo "Ensure each Cargo.toml has: license = \"LICENSE\""
exit 1
fi

echo "All packages correctly reference LICENSE file"
1 change: 1 addition & 0 deletions bin/ethlambda/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "ethlambda"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true

[dependencies]
ethlambda-blockchain.workspace = true
Expand Down