Skip to content

Commit

Permalink
Fix CI for copyright header (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
fboemer authored Jan 6, 2025
1 parent e7b196b commit 62a9806
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Apple Inc. and the Swift Homomorphic Encryption project authors
# Copyright 2024-2025 Apple Inc. and the Swift Homomorphic Encryption project authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -63,10 +63,23 @@ jobs:
run: pip install pre-commit
- name: Pre-commit checks
# CI will commit to `main`
# swiftformat & swiftlint tested separately
# swiftformat, swiftlint and license checks tested separately
run: >
SKIP=no-commit-to-branch,lockwood-swiftformat,swiftlint,check-doc-comments
SKIP=no-commit-to-branch,lockwood-swiftformat,swiftlint,check-doc-comments,insert-license
pre-commit run --all-files
insert-license:
timeout-minutes: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install pre-commit
run: pip install pre-commit
- name: List changed files
run: git diff --name-only HEAD~1
- name: Run license check
run: pre-commit run insert-license --files $(git diff --name-only HEAD~1)
lint:
timeout-minutes: 15
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Apple Inc. and the Swift Homomorphic Encryption project authors
# Copyright 2024-2025 Apple Inc. and the Swift Homomorphic Encryption project authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
Expand All @@ -29,7 +29,7 @@ repos:
args: [--branch, main]
- id: trailing-whitespace
- repo: https://github.com/crate-ci/typos
rev: v1.23.1
rev: v1.29.3
hooks:
- id: typos
- repo: https://github.com/Lucas-C/pre-commit-hooks
Expand Down

0 comments on commit 62a9806

Please sign in to comment.