Add initial source code, with passing test
continuous-integration/drone/push Build is passing Detalhes

Esse commit está contido em:
Matthias Neeracher 2019-02-03 03:25:27 +01:00
commit 7a9535bdfe
7 arquivos alterados com 88 adições e 2 exclusões

9
.drone.yml Normal file
Ver arquivo

@ -0,0 +1,9 @@
kind: pipeline
name: default
steps:
- name: test
image: swift:4.2
commands:
- swift build
- swift test

28
Package.swift Normal file
Ver arquivo

@ -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: "drone-tutorial-swift",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "drone-tutorial-swift",
targets: ["drone-tutorial-swift"]),
],
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: "drone-tutorial-swift",
dependencies: []),
.testTarget(
name: "drone-tutorial-swiftTests",
dependencies: ["drone-tutorial-swift"]),
]
)

Ver arquivo

@ -1,3 +1,18 @@
# drone-tutorial-swift
# Drone Tutorial: Swift
This is a swimple Swift project to observe the Drone Continuous Delivery platform in action.
This is a swimple Swift project to observe the Drone Continuous Delivery platform in action.
## Usage
* Clone this project
* Set up a corresponding project on the Drone-equipped Git platform you want to try.
* Push the `master` branch to your own project.
* Log into drone. You should see a build getting created and succeeding.
* Push the `bad_test` branch to your own project.
* You should see a drone build getting created, and failing in the `test` stage.
## License
This is `CC0` licensed. Adapt it to whatever purpose you want. Have fun.
`microtherion@gmail.com` 2019-02-02

Ver arquivo

@ -0,0 +1,3 @@
struct drone_tutorial_swift {
var text = "Hello, World!"
}

7
Tests/LinuxMain.swift Normal file
Ver arquivo

@ -0,0 +1,7 @@
import XCTest
import drone_tutorial_swiftTests
var tests = [XCTestCaseEntry]()
tests += drone_tutorial_swiftTests.allTests()
XCTMain(tests)

Ver arquivo

@ -0,0 +1,9 @@
import XCTest
#if !os(macOS)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(drone_tutorial_swiftTests.allTests),
]
}
#endif

Ver arquivo

@ -0,0 +1,15 @@
import XCTest
@testable import drone_tutorial_swift
final class drone_tutorial_swiftTests: 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(drone_tutorial_swift().text, "Hello, World!")
}
static var allTests = [
("testExample", testExample),
]
}