Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use norionomura/action-swiftlint@master as GitHub Action #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
16 changes: 16 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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@master
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
28 changes: 28 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "test-action-swiftlint",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "test-action-swiftlint",
targets: ["test-action-swiftlint"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "test-action-swiftlint",
dependencies: []),
.testTarget(
name: "test-action-swiftlintTests",
dependencies: ["test-action-swiftlint"]),
]
)
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# test-action-swiftlint

A description of this package.
3 changes: 3 additions & 0 deletions Sources/test-action-swiftlint/test_action_swiftlint.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
struct test_action_swiftlint {
var text = "Hello, World!"
}
7 changes: 7 additions & 0 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import XCTest

import test_action_swiftlintTests

var tests = [XCTestCaseEntry]()
tests += test_action_swiftlintTests.allTests()
XCTMain(tests)
9 changes: 9 additions & 0 deletions Tests/test-action-swiftlintTests/XCTestManifests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import XCTest

#if !os(macOS)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(test_action_swiftlintTests.allTests),
]
}
#endif
15 changes: 15 additions & 0 deletions Tests/test-action-swiftlintTests/test_action_swiftlintTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import XCTest
@testable import test_action_swiftlint

final class test_action_swiftlintTests: XCTestCase {
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
XCTAssertEqual(test_action_swiftlint().text, "Hello, World!")
}

static var allTests = [
("testExample", testExample),
]
}