Skip to content

Commit

Permalink
Add GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
juri committed May 11, 2024
1 parent 945f9bc commit dc4f25d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Set up Swift
uses: swift-actions/setup-swift@v2
with:
swift-version: "5.10"

- name: Checkout
uses: actions/checkout@v3

- name: Build
run: swift build

- name: Run tests
run: swift test
25 changes: 25 additions & 0 deletions .github/workflows/swiftformat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: SwiftFormat

on:
pull_request:
paths:
- '.github/workflows/swiftformat.yml'
- '.swiftformat'
- '**/*.swift'

jobs:
SwiftFormat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Swift
uses: swift-actions/[email protected]
with:
swift-version: "5.10"

- name: Set up Mint
uses: irgaly/[email protected]

- name: Run SwiftFormat with Mint
run: mint run swiftformat . --lint

0 comments on commit dc4f25d

Please sign in to comment.