Migrate CI to GitHub Actions, test on Linux
This commit is contained in:
parent
c5743c6437
commit
5e85356a1c
|
@ -0,0 +1,22 @@
|
|||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Danger
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
# events but only for the master branch
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
danger-lint:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Danger Swift
|
||||
uses: maxdesiatov/danger-swift@swiftlint-docker
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -0,0 +1,30 @@
|
|||
name: Build and test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
macos_build:
|
||||
runs-on: macos-10.15
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
set -x
|
||||
./test.sh
|
||||
./codecov.sh
|
||||
|
||||
linux_build:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Test on Ubuntu with Swift 5.2
|
||||
uses: Didstopia/SwiftAction@v1.0.2
|
||||
with:
|
||||
swift-action: test --enable-test-discovery
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "swift build",
|
||||
"type": "shell",
|
||||
"command": "swift build"
|
||||
},
|
||||
{
|
||||
"label": "swift test",
|
||||
"type": "shell",
|
||||
"command": "swift test"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
// swift-tools-version:5.1
|
||||
// swift-tools-version:5.2
|
||||
// The swift-tools-version declares the minimum version of Swift required to
|
||||
// build this package.
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
import XCTest
|
||||
|
||||
import TokamakTests
|
||||
|
||||
var tests = [XCTestCaseEntry]()
|
||||
tests += TokamakTests.allTests()
|
||||
XCTMain(tests)
|
|
@ -1,19 +0,0 @@
|
|||
trigger:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
- job: lint
|
||||
pool:
|
||||
vmImage: "macOS-10.15"
|
||||
steps:
|
||||
- bash: ./lint.sh
|
||||
|
||||
- job: test
|
||||
pool:
|
||||
vmImage: "macOS-10.15"
|
||||
steps:
|
||||
- bash: ./test.sh
|
||||
- bash: ./codecov.sh
|
||||
env:
|
||||
CODECOV_TOKEN: $(codecovToken)
|
||||
condition: succeeded()
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
set -ex
|
||||
|
||||
bash <(curl -s https://codecov.io/bash)
|
9
lint.sh
9
lint.sh
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
brew update
|
||||
brew install swiftformat swiftlint
|
||||
|
||||
swiftformat --lint --verbose .
|
||||
swiftlint
|
Loading…
Reference in New Issue