Skip to content
Open
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
31 changes: 31 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift

name: Swift

on:
push:
branches: [ "master" ]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be "main"

pull_request:
branches: [ "master" ]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"main"


jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Swift
uses: swift-actions/setup-swift@v2
with:
swift-version: "6"

- name: Get swift version
run: swift --version

- name: Build
run: swift build -v

- name: Run tests
run: swift test -v

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also recommend adding

concurrency:                                 
    group: ${{ github.workflow }}-${{ github.ref }}                                                                                                                                                                         
    cancel-in-progress: true