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
23 changes: 19 additions & 4 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ concurrency:
cancel-in-progress: true

jobs:
spelling:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Spell Check Repo
uses: crate-ci/typos@v1.42.3

linting:
runs-on: macos-26
steps:
Expand All @@ -30,14 +39,20 @@ jobs:
- linting
strategy:
matrix:
xcode: ['14.1']
xcode: ['26.2']
steps:
- uses: actions/checkout@v3
- name: "Install just"
run: |
if ! command -v just >/dev/null; then
brew update
brew install just
fi
- name: "Select Xcode ${{ matrix.xcode }}"
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: "Clean and init submodules"
run: make init
run: just init
- name: "Run test in debug"
run: make testdebug
run: just testdebug
- name: "Run test in production"
run: make testprod
run: just testprod
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
scripts/update-libsecp/Package.resolved
scripts/update-libsecp/.build
scripts/*.pyc
scripts/update-libsecp/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
fail_fast: true
default_install_hook_types: [pre-commit]
default_stages: [pre-commit]
repos:
- repo: https://github.com/crate-ci/typos
rev: v1.42.3
hooks:
- id: typos

- repo: local
hooks:
- id: lint
name: lint
language: system
types: [file, swift]
entry: swiftformat . --lint
pass_filenames: false
- id: unit tests
name: unit tests
language: system
types: [file, swift]
entry: swift test
pass_filenames: false
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.18
4 changes: 2 additions & 2 deletions .swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

--stripunusedargs closure-only
--enable marktypes
--disable redundantNilInit,redundantSelf,extensionAccessControl
--disable redundantNilInit,redundantSelf,extensionAccessControl,simplifyGenericConstraints
--lineaftermarks false
--ifdef no-indent
--header strip

# file options
--exclude .build,Sources/secp256k1,Sources/K1/Support/ThirdyParty,**/*.swift.gyb,**/*.generated.swift
--exclude .build,Sources/secp256k1,Tests,Sources/K1/Support/ThirdyParty,**/*.swift.gyb,**/*.generated.swift
7 changes: 7 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
disabled_rules:
- trailing_comma

excluded:
- .build
- scripts/update-libsecp/.build
- Tests/K1Tests/TestCases/
Loading
Loading