Skip to content

Commit

Permalink
Add CI (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
fboemer authored Aug 13, 2024
1 parent e45c012 commit ad851b0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2024 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.
# 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.

name: CI
permissions:
contents: read
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
types: [opened, reopened, synchronize, ready_for_review]
# Pushing changes to PR stops currently-running CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pre-commit
run: pip install pre-commit
- name: Pre-commit checks
# CI will commit to `main`
run: >
SKIP=no-commit-to-branch
pre-commit run --all-files
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ repos:
- copyright-header.txt
- --allow-past-years
- repo: https://github.com/bufbuild/buf
rev: v1.34.0
rev: v1.36.0
hooks:
- id: buf-lint
- id: buf-format
- id: buf-breaking
args: [--against, '.git#branch=main']
args: [--against, 'https://github.com/apple/swift-homomorphic-encryption-protobuf.git#branch=main']
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ To install `pre-commit`, follow instructions in https://pre-commit.com/. We reco

### Pull Requests:
Before making a commit for a pull request, please run `pre-commit install`.
Then on each commit some basic formatting checks will be run.
Then on each commit some basic formatting checks will be run.

0 comments on commit ad851b0

Please sign in to comment.