Skip to content
Open
24 changes: 24 additions & 0 deletions .github/workflows/swift.yml

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Please rename to swift-unit-test.yml

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Swift

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
name: Swift
name: Swift unit test


on:
pull_request:
branches: [ master ]
paths:
- '**/*.swift'
- '**/*.yml'

jobs:
test:
name: Run Swift Tests
runs-on: ubuntu-latest

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is an interesting approach. Users of this tool should be using macOS, but making the tool cross-platform may have some value?


steps:
- name: Check out code
uses: actions/checkout@v2

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why not using the latest version? I think it's v4 now?


- name: Setup Swift
uses: swift-actions/setup-swift@v1.26.0

- name: Run tests
run: swift test
working-directory: StringCatalogEnum
28 changes: 28 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: SwiftLint

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

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
- name: GitHub Action for SwiftLint with --strict
uses: norio-nomura/action-swiftlint@3.2.1
with:
args: --strict
- name: GitHub Action for SwiftLint (Only files changed in the PR)
uses: norio-nomura/action-swiftlint@3.2.1
env:
DIFF_BASE: ${{ github.base_ref }}
- name: GitHub Action for SwiftLint (Different working directory)
uses: norio-nomura/action-swiftlint@3.2.1
env:
WORKING_DIRECTORY: Source