Skip to content

Commit

Permalink
.github/workflows: break out Swift and Test files
Browse files Browse the repository at this point in the history
  • Loading branch information
ydnar committed Jun 15, 2024
1 parent 5c21ef4 commit 06265f2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 18 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ on:
- "Sources/Copus"

jobs:
swiftformat:
name: SwiftFormat
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand All @@ -38,19 +38,3 @@ jobs:

- name: Verify formatted code is unchanged
run: git diff --exit-code HEAD -w -G'(^[^# /])|(^#\w)|(^\s+[^#/])' # Ignore whitespace and comments

test:
name: Test
runs-on: macos-latest
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive

- name: Test
run: swift test

- name: Generate release build
run: swift build -c release
36 changes: 36 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
push:
branches:
- main
paths:
- ".github/workflows/swift.yaml"
- ".gitmodules"
- "**.swift"
- "Package.resolved"
- "Sources/Copus"
pull_request:
paths:
- ".github/workflows/swift.yaml"
- ".gitmodules"
- "**.swift"
- "Package.resolved"
- "Sources/Copus"

jobs:
test:
name: Test
runs-on: macos-latest
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive

- name: Test
run: swift test

- name: Generate release build
run: swift build -c release

0 comments on commit 06265f2

Please sign in to comment.