Skip to content

Commit

Permalink
Configure Github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouke committed Aug 16, 2020
1 parent 2a3d569 commit 5449109
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
branches:
- master
jobs:
publish:
name: Publish
Publish:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
Expand Down
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 }}
12 changes: 12 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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]
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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: |
sudo apt install libavahi-compat-libdnssd-dev libsodium-dev libssl-dev
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
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: Setup libsodium
run: brew install libsodium
- name: Run Tests
run: swift test -c release -Xswiftc -enable-testing
1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sonar.organization=bouke-github
sonar.projectKey=Bouke_HAP
sonar.sources=Sources
sonar.tests=Tests
Expand Down

0 comments on commit 5449109

Please sign in to comment.