Switch from travis to github actions
This commit is contained in:
7
.github/dependabot.yml
vendored
Normal file
7
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
version: 2
|
||||
updates:
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
25
.github/workflows/danger.yml
vendored
Normal file
25
.github/workflows/danger.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Danger
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Danger Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
-
|
||||
name: Run Danger
|
||||
run: bundle exec danger --verbose --dangerfile=rakelib/Dangerfile
|
||||
env:
|
||||
DANGER_GITHUB_API_TOKEN: ${{ secrets.danger_github_api_token }}
|
||||
23
.github/workflows/lint-cocoapods.yml
vendored
Normal file
23
.github/workflows/lint-cocoapods.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Lint Cocoapods
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Pod Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
-
|
||||
name: Lint podspec
|
||||
run: bundle exec rake pod:lint
|
||||
23
.github/workflows/release-check-versions.yml
vendored
Normal file
23
.github/workflows/release-check-versions.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Check Versions
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'release/**'
|
||||
|
||||
jobs:
|
||||
check_versions:
|
||||
name: Check Versions
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
-
|
||||
name: Check versions
|
||||
run: bundle exec rake release:check_versions
|
||||
26
.github/workflows/swiftlint.yml
vendored
Normal file
26
.github/workflows/swiftlint.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: SwiftLint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: SwiftLint
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
-
|
||||
name: Lint source code
|
||||
run: bundle exec rake lint:code
|
||||
-
|
||||
name: Lint tests source code
|
||||
run: bundle exec rake lint:tests
|
||||
44
.github/workflows/tag-publish.yml
vendored
Normal file
44
.github/workflows/tag-publish.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Publish on Tag
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
cocoapods:
|
||||
name: Push To CocoaPods
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
-
|
||||
name: Push to CocoaPods
|
||||
run: bundle exec rake release:cocoapods
|
||||
env:
|
||||
COCOAPODS_TRUNK_TOKEN: ${{secrets.COCOAPODS_TRUNK_TOKEN}}
|
||||
|
||||
github:
|
||||
name: GitHub Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
-
|
||||
name: Create release on GitHub
|
||||
run: bundle exec rake release:github
|
||||
env:
|
||||
DANGER_GITHUB_API_TOKEN: ${{ secrets.danger_github_api_token }}
|
||||
66
.github/workflows/test-spm.yml
vendored
Normal file
66
.github/workflows/test-spm.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
name: Test SPM
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
name: Test SPM Linux
|
||||
runs-on: ubuntu-latest
|
||||
container: swiftgen/swift:5.6
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
# Note: we can't use `ruby/setup-ruby` on custom docker images, so we
|
||||
# have to do our own caching
|
||||
name: Cache gems
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gems-
|
||||
-
|
||||
name: Cache SPM
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .build
|
||||
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-spm-
|
||||
-
|
||||
name: Bundle install
|
||||
run: |
|
||||
bundle config path vendor/bundle
|
||||
bundle install --jobs 4 --retry 3
|
||||
-
|
||||
name: Run tests
|
||||
run: bundle exec rake spm:test
|
||||
|
||||
macos:
|
||||
name: Test SPM macOS
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
-
|
||||
name: Cache SPM
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .build
|
||||
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-spm-
|
||||
-
|
||||
name: Run tests
|
||||
run: bundle exec rake spm:test
|
||||
22
.travis.yml
22
.travis.yml
@@ -1,22 +0,0 @@
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
osx_image: xcode11.4
|
||||
env: SWIFT_VERSION=4.2
|
||||
- os: osx
|
||||
osx_image: xcode11.4
|
||||
env: SWIFT_VERSION=5.0
|
||||
- os: linux
|
||||
env: SWIFT_VERSION=4.2
|
||||
- os: linux
|
||||
env: SWIFT_VERSION=5.0
|
||||
language: generic
|
||||
sudo: required
|
||||
dist: trusty
|
||||
install:
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then wget --output-document /tmp/SwiftLint.pkg https://github.com/realm/SwiftLint/releases/download/0.39.2/SwiftLint.pkg &&
|
||||
sudo installer -pkg /tmp/SwiftLint.pkg -target /; fi
|
||||
script:
|
||||
- swift test
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then swiftlint; fi
|
||||
Reference in New Issue
Block a user