Unverified Commit 2e9da81b authored by manuroe's avatar manuroe Committed by GitHub
Browse files

Merge pull request #4135 from vector-im/gh-actions

Introduce GitHub Actions
parents 21bcfe4b 29552ce9
name: CI
on:
# Triggers the workflow on any pull request and push to develop
push:
branches: [ develop ]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: Build
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
# Common cache
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
# Common setup
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Use right MatrixKit and MatrixSDK versions
run: bundle exec fastlane point_dependencies_to_pending_releases
# Main step
- name: Build iOS simulator
run: bundle exec fastlane build
tests:
name: Tests
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
# Common cache
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
# Common setup
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Use right MatrixKit and MatrixSDK versions
run: bundle exec fastlane point_dependencies_to_pending_releases
# Main step
- name: Unit tests
run: bundle exec fastlane test
......@@ -24,7 +24,7 @@ Changes to be released in next version
*
🧱 Build
*
* GH Actions: Start using them for CI to check simulator build and tests.
Others
*
......
......@@ -22,7 +22,7 @@ class EmojiServiceTests: XCTestCase {
// MARK: - Constants
private let defaultTimeout: TimeInterval = 1.5
private let defaultTimeout: TimeInterval = 10
enum ExpectedEmojiCategory: Int {
case people
......
......@@ -79,6 +79,23 @@ platform :ios do
)
end
desc "Run tests"
lane :test do
xcodegen(spec: "project.yml")
cocoapods
run_tests(
workspace: "Riot.xcworkspace",
scheme: "Riot",
code_coverage: true,
# Test result configuration
result_bundle: true,
output_directory: "./build/test",
open_report: !is_ci?
)
end
#### Private ####
desc "Download App Store or Ad-Hoc provisioning profiles"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment