diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..a56200b0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: build + +on: + push: + pull_request: +jobs: + macos: + runs-on: macos-10.14 + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Build and Test + run: + xcodebuild -project SwiftFormat.xcodeproj -scheme "SwiftFormat (Framework)" -sdk macosx clean build test + env: + DEVELOPER_DIR: /Applications/Xcode_11.2.1.app/Contents/Developer + - name: Codecov + run: bash <(curl -s https://codecov.io/bash) -t a47579fa-9a2a-4c48-b557-aa725c6b5f92 + linux: + runs-on: ubuntu-latest + container: + image: swift:5.2 + options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --security-opt apparmor=unconfined + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Build and Test + run: swift test + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f45c96a6..00000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -env: - global: - - LC_CTYPE=en_US.UTF-8 -matrix: - include: - - os: osx - language: swift - osx_image: xcode10.1 - script: - - set -o pipefail - - xcodebuild -project SwiftFormat.xcodeproj -scheme "SwiftFormat (Framework)" -sdk macosx clean build test - after_success: - - bash <(curl -s https://codecov.io/bash) -t a47579fa-9a2a-4c48-b557-aa725c6b5f92 - - os: linux - dist: xenial - sudo: required - services: docker - env: DOCKER_IMAGE=swift:5.0.3-xenial SWIFT_SNAPSHOT=5.0.3 SWIFT_VERSION=5.0.3 SWIFT_TEST_ARGS="--parallel" - install: eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" - script: swift test diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fff526c3..c4729d9f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,9 +33,9 @@ Types of PR: ## Copyright and Licensing -Any new source files that you add should include the standard licence header used in all the existing files. You may include your own name as the author for files that you created or replaced. +Any new source files that you add should include the standard license header used in all the existing files. You may include your own name as the author for files that you created or replaced. -By contributing code to SwiftFormat, you are implicitly agreeing to licence it under the terms described in the LICENSE.md file. Please do not submit code that you did not write or are not authorized to redistribute. +By contributing code to SwiftFormat, you are implicitly agreeing to license it under the terms described in the LICENSE.md file. Please do not submit code that you did not write or are not authorized to redistribute. Inclusion of 3rd party frameworks is **not** permitted, regardless of the license. Small sections of code copied from somewhere else *may* be acceptable, provided that the terms of the original license are compatible with SwiftFormat's LICENSE.md, and that you include a comment linking back to the source. @@ -55,12 +55,12 @@ When making user-facing changes, please update the README.md file if applicable. All significant code changes should be accompanied by a test. -Tests are run in [Travis CI](https://travis-ci.org/nicklockwood/SwiftFormat) automatically on all pull requests, branches and tags. These are the same tests that run in Xcode at development time. +Tests are run automatically on all pull requests, branches and tags. These are the same tests that run in Xcode at development time. There is a separate Performance Tests scheme that you should run manually if your code changes are likely to affect performance. ## Code of Conduct -There will be zero tolerance for rudeness or bullying. If you think somebody else's comment or pull request is stupid, keep it to yourself. If you are frustrated because your issue or pull request isn't getting the attention it deserves, feel free to post a comment like "any update on this?", but remember that we are all busy, and other peoples' priorites don't necessarily match yours. +There will be zero tolerance for rudeness or bullying. If you think somebody else's comment or pull request is stupid, keep it to yourself. If you are frustrated because your issue or pull request isn't getting the attention it deserves, feel free to post a comment like "any update on this?", but remember that we are all busy, and other peoples' priorities don't necessarily match yours. Abusive contributors will be blocked and/or reported, regardless of how valuable their code contributions may be. diff --git a/README.md b/README.md index 5a4da664..48da5892 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![](EditorExtension/Application/Assets.xcassets/AppIcon.appiconset/icon_256x256.png) [![PayPal](https://img.shields.io/badge/paypal-donate-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9ZGWNK5FEZFF6&source=url) -[![Travis](https://api.travis-ci.com/nicklockwood/SwiftFormat.svg?branch=master)](https://travis-ci.com/github/nicklockwood/SwiftFormat) +[![Build](https://github.com/nicklockwood/SwiftFormat/actions/workflows/build.yml/badge.svg)](https://github.com/nicklockwood/SwiftFormat/actions/workflows/build.yml) [![Codecov](https://codecov.io/gh/nicklockwood/SwiftFormat/graphs/badge.svg)](https://codecov.io/gh/nicklockwood/SwiftFormat) [![Swift 4.2](https://img.shields.io/badge/swift-4.2-red.svg?style=flat)](https://developer.apple.com/swift) [![License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://opensource.org/licenses/MIT)