-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add integration tests to the CI #1537
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
eafcc4f
Git ignore vscode and bundle working dirs
manuroe 36dcd9b
Tests: Make sure setUp and tearDown
manuroe 8e1b3c4
Tests: Stub MXMemoryStore.stateOfRoom ()
manuroe 55b959d
Tests: Create AllWorkingTests test plan with stable tests
manuroe 9c80f69
AllWorkingTests: Disable test classes with tests that crash
manuroe 48c32dc
AllWorkingTests: Disable the 22 tests that fail
manuroe 5152b44
AllWorkingTests: Disable all unit tests
manuroe cf71bb2
Tests: Run working integration tests on every PR
manuroe 77af368
Crypto tests CI: Expose tests report on failure and share code coverage
manuroe 3276455
AllWorkingTests: Disabled commented tests
manuroe 4bd5d27
changelog
manuroe 86ea3bf
AllWorkingTests: Disable tests that do not pass on GH actions
manuroe db9114b
Empty commit to wake codecov
manuroe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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/setup-matrix-synapse@v1.0.3 | ||
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Element is using macos-12. We can start using that in the SDK as well but it's probably best done as a separate PR.