diff --git a/.circleci/config.yml b/.circleci/config.yml index 1084e29..5c27b2b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,19 +1,65 @@ +version: 2 jobs: - build: - docker: - - image: buildpack-deps:trusty + MacOS: + macos: + xcode: "9.0" steps: - checkout + - restore_cache: + keys: + - v1-spm-deps-{{ checksum "Package.swift" }} - run: - name: Install Swift - command: 'eval "$(curl -sL https://apt.vapor.sh)"' + name: Install CMySQL and CTLS + command: | + brew tap vapor/homebrew-tap + brew install cmysql + brew install ctls - run: - name: Install Vapor toolbox + name: Build and Run Tests + no_output_timeout: 1800 command: | - sudo apt-get install --yes vapor - sudo apt-get install --yes cmysql - sudo chmod -R a+rx /usr/ + swift package generate-xcodeproj --enable-code-coverage + xcodebuild -scheme AWS-Package -enableCodeCoverage YES test | xcpretty - run: + name: Report coverage to Codecov + command: | + bash <(curl -s https://codecov.io/bash) + - save_cache: + key: v1-spm-deps-{{ checksum "Package.swift" }} + paths: + - .build + Linux: + docker: + - image: brettrtoomey/vapor-ci:0.0.1 + steps: + - checkout + - restore_cache: + keys: + - v2-spm-deps-{{ checksum "Package.swift" }} + - run: + name: Copy Package file + command: cp Package.swift res + - run: + name: Build and Run Tests + no_output_timeout: 1800 command: | swift test -Xswiftc -DNOJSON - + - run: + name: Restoring Package file + command: mv res Package.swift + - save_cache: + key: v2-spm-deps-{{ checksum "Package.swift" }} + paths: + - .build +workflows: + version: 2 + build-and-test: + jobs: + - MacOS + - Linux +experimental: + notify: + branches: + only: + - master + - develop diff --git a/.codebeatignore b/.codebeatignore new file mode 100644 index 0000000..2d9084a --- /dev/null +++ b/.codebeatignore @@ -0,0 +1,2 @@ +Public/** +Resources/Assets/** diff --git a/.swiftlint.yml b/.swiftlint.yml new file mode 100644 index 0000000..1e79593 --- /dev/null +++ b/.swiftlint.yml @@ -0,0 +1,12 @@ +included: + - Sources +function_body_length: + warning: 60 +variable_name: + min_length: + warning: 2 +line_length: 80 +disabled_rules: + - opening_brace +colon: + flexible_right_spacing: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 405aeb2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -os: - - osx - -language: swift -sudo: required -osx_image: xcode8.3 - -before_install: - brew tap vapor/tap; - brew update; - brew install vapor; - brew install cmysql; - gem install xcpretty; - -script: - - swift build - - swift build -c release - - swift package generate-xcodeproj --enable-code-coverage - - xcodebuild -scheme AWS -enableCodeCoverage YES test | xcpretty - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/LICENSE b/LICENSE index 312cc32..6b300b3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Nodes Agency - Operations +Copyright (c) 2016-2018 Nodes Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 9639390..d6735ae 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # AWS -[![Swift Version](https://img.shields.io/badge/Swift-3.1-brightgreen.svg)](http://swift.org) +[![Swift Version](https://img.shields.io/badge/Swift-3-brightgreen.svg)](http://swift.org) [![Vapor Version](https://img.shields.io/badge/Vapor-2-F6CBCA.svg)](http://vapor.codes) -[![Linux Build Status](https://img.shields.io/circleci/project/github/nodes-vapor/aws.svg?label=Linux)](https://circleci.com/gh/nodes-vapor/aws) -[![macOS Build Status](https://img.shields.io/travis/nodes-vapor/aws.svg?label=macOS)](https://travis-ci.org/nodes-vapor/aws) -[![codebeat badge](https://codebeat.co/badges/52c2f960-625c-4a63-ae63-52a24d747da1)](https://codebeat.co/projects/github-com-nodes-vapor-aws) +[![Circle CI](https://circleci.com/gh/nodes-vapor/aws/tree/master.svg?style=shield)](https://circleci.com/gh/nodes-vapor/aws) +[![codebeat badge](https://codebeat.co/badges/255e7772-28ec-4695-bdd5-770cfd676d9c)](https://codebeat.co/projects/github-com-nodes-vapor-aws-master) [![codecov](https://codecov.io/gh/nodes-vapor/aws/branch/master/graph/badge.svg)](https://codecov.io/gh/nodes-vapor/aws) [![Readme Score](http://readme-score-api.herokuapp.com/score.svg?url=https://github.com/nodes-vapor/aws)](http://clayallsopp.github.io/readme-score?url=https://github.com/nodes-vapor/aws) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/nodes-vapor/aws/master/LICENSE)