Skip to content

Commit

Permalink
Use GH actions for CI / docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouke committed Aug 26, 2020
1 parent e99912c commit e419690
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 43 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Publish Docs
on:
push:
branches:
- master
jobs:
Publish:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Publish Jazzy Docs
uses: Steven0351/[email protected]
with:
config: .jazzy.yaml
personal_access_token: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: SonarCloud
on:
push:
branches: [ master ]
pull_request:
jobs:
SonarCloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: SwiftLint
on:
push:
branches: [ master ]
pull_request:
jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: SwiftLint
uses: norio-nomura/[email protected]
with:
args: --strict
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Test
on:
push:
branches: [ master ]
pull_request:
jobs:
Ubuntu:
runs-on: ubuntu-18.04
strategy:
matrix:
swift: ['5.1', '5.2']
steps:
- uses: actions/checkout@v2
- name: Setup Swift ${{ matrix.swift }}
run: |
wget https://swift.org/builds/swift-${{ matrix.swift }}-release/ubuntu1804/swift-${{ matrix.swift }}-RELEASE/swift-${{ matrix.swift }}-RELEASE-ubuntu18.04.tar.gz
tar xzf swift-${{ matrix.swift }}-RELEASE-ubuntu18.04.tar.gz
export PATH=`pwd`/swift-${{ matrix.swift }}-RELEASE-ubuntu18.04/usr/bin:"${PATH}"
- name: Run Tests
run: swift test -c release -Xswiftc -enable-testing
macOS:
runs-on: macos-latest
continue-on-error: ${{ matrix.swift == '5.3' }}
strategy:
matrix:
swift: ['5.1', '5.2', '5.3']
steps:
- uses: actions/checkout@v2
- name: Setup Swift 5.1
run: sudo xcode-select -s /Applications/Xcode_11.3.1.app/Contents/Developer
if: matrix.swift == '5.1'
- name: Setup Swift 5.2
run: sudo xcode-select -s /Applications/Xcode_11.6.app/Contents/Developer
if: matrix.swift == '5.2'
- name: Setup Swift 5.3
run: sudo xcode-select -s /Applications/Xcode_12_beta.app/Contents/Developer
if: matrix.swift == '5.3'
- name: Run Tests
run: swift test -c release -Xswiftc -enable-testing
49 changes: 7 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,12 @@
branches:
only:
- master
language: generic
sudo: required
script: make test
script: swift test -c release -Xswiftc -enable-testing
matrix:
include:
- name: Swift 5.1
- name: Swift 5.1 on macOS 10.14
os: osx
osx_image: xcode11
- name: Swift 5.2
os: osx
osx_image: xcode11.4
- name: Swift 5.3
os: osx
osx_image: xcode12
- name: Swift 5.1
os: linux
dist: trusty
before_install:
- wget https://swift.org/builds/swift-5.1-release/ubuntu1404/swift-5.1-RELEASE/swift-5.1-RELEASE-ubuntu14.04.tar.gz
- tar xzf swift-5.1-RELEASE-ubuntu14.04.tar.gz
- export PATH=`pwd`/swift-5.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
- name: Validate against srptools library
os: linux
dist: trusty
before_install:
- wget https://swift.org/builds/swift-5.1-release/ubuntu1404/swift-5.1-RELEASE/swift-5.1-RELEASE-ubuntu14.04.tar.gz
- tar xzf swift-5.1-RELEASE-ubuntu14.04.tar.gz
- export PATH=`pwd`/swift-5.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
- python -V
- pip -V
- sudo pip install --upgrade pip
- sudo pip install srptools
script: make test-with-python
- name: Code Quality Checks
os: osx
osx_image: xcode11
install:
- brew upgrade swiftlint || true
script: swiftlint --strict
- name: SonarCloud scanner
os: osx
osx_image: xcode11
addons:
sonarcloud:
organization: bouke-github
before_script: git fetch --unshallow --quiet
script: sonar-scanner
osx_image: xcode11.3

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Secure Remote Password is a authentication protocol to prove your identity to
another party, using a password, but without ever revealing that password to
other parties. Not even the party you are proving your identity. See [Secure Remote Password protocol][5] for more information on this protocol.

[![Build Status](https://travis-ci.org/Bouke/SRP.svg?branch=master)](https://travis-ci.org/Bouke/SRP)
![CI status](https://github.com/Bouke/SRP/workflows/Test/badge.svg)

## Example usage

Expand Down
4 changes: 4 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
sonar.organization=bouke-github
sonar.projectKey=Bouke_SRP
sonar.sources=Sources
sonar.tests=Tests
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-

0 comments on commit e419690

Please sign in to comment.