-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1537 from matrix-org/manu/working_integration_tes…
…t_plan Add integration tests to the CI
- Loading branch information
Showing
44 changed files
with
297 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,6 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-pip- | ||
${{ runner.os }}- | ||
# Cache for Xcode env | ||
- uses: actions/cache@v2 | ||
with: | ||
|
@@ -50,7 +49,6 @@ jobs: | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
- name: Start synapse server | ||
uses: michaelkaye/[email protected] | ||
with: | ||
|
@@ -62,21 +60,27 @@ jobs: | |
run: | | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
# Main step | ||
- name: Crypto tests | ||
run: bundle exec fastlane test testplan:CryptoTests | ||
|
||
# Store artifacts | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: report.html | ||
path: build/test/report.html | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: report.junit | ||
path: build/test/report.junit | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: MatrixSDK-macOS.xcresult | ||
path: build/test/MatrixSDK-macOS.xcresult/ | ||
|
||
# Upload coverage | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Integration Tests 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: | ||
integration-tests: | ||
name: Integration Tests | ||
runs-on: macos-11 | ||
|
||
concurrency: | ||
# When running on develop, use the sha to allow all runs of this workflow to run concurrently. | ||
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs. | ||
group: ${{ github.ref == 'refs/heads/develop' && format('tests-integration-develop-{0}', github.sha) || format('tests-integration-{0}', github.ref) }} | ||
cancel-in-progress: true | ||
|
||
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- | ||
# Cache for python env for Synapse | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
${{ runner.os }}- | ||
# Set up a Synapse server | ||
- name: Start synapse server | ||
uses: michaelkaye/[email protected] | ||
with: | ||
uploadLogs: true | ||
httpPort: 8080 | ||
disableRateLimiting: true | ||
|
||
# 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 | ||
# Main step | ||
- name: Integration tests | ||
run: bundle exec fastlane test testplan:AllWorkingTests | ||
|
||
# Store artifacts | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: report.html | ||
path: build/test/report.html | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: report.junit | ||
path: build/test/report.junit | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: MatrixSDK-macOS.xcresult | ||
path: build/test/MatrixSDK-macOS.xcresult/ | ||
|
||
# Upload coverage | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,8 @@ DerivedData | |
*.ipa | ||
*.xcuserstate | ||
*.DS_Store | ||
.vscode/ | ||
vendor/ | ||
|
||
# CocoaPods | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,8 @@ - (void)tearDown | |
{ | ||
matrixSDKTestsData = nil; | ||
matrixSDKTestsE2EData = nil; | ||
|
||
[super tearDown]; | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,8 @@ - (void)tearDown | |
{ | ||
matrixSDKTestsData = nil; | ||
matrixSDKTestsE2EData = nil; | ||
|
||
[super tearDown]; | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,8 @@ - (void)tearDown | |
{ | ||
matrixSDKTestsData = nil; | ||
matrixSDKTestsE2EData = nil; | ||
|
||
[super tearDown]; | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,8 @@ - (void)tearDown | |
{ | ||
matrixSDKTestsData = nil; | ||
matrixSDKTestsE2EData = nil; | ||
|
||
[super tearDown]; | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.