-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split test suite in 3 plans and run them in different actions
- Loading branch information
Valeriu Popa
committed
Dec 22, 2023
1 parent
8519a73
commit 2aa4c42
Showing
15 changed files
with
210 additions
and
1,644 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 |
---|---|---|
@@ -1,65 +1,163 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
push: | ||
branches: | ||
- main | ||
- feature/* | ||
pull_request: | ||
workflow_dispatch: | ||
- main | ||
- feature/* | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer | ||
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer | ||
|
||
jobs: | ||
test: | ||
test_0: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Ruby & Bundle setup | ||
- name: Ruby & Bundle setup | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
bundler-cache: true | ||
ruby-version: 2.6 | ||
bundler-cache: true | ||
|
||
- name: Cocoapods cache | ||
- name: Cocoapods cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: Pods | ||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
restore-keys: | | ||
path: Pods | ||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pods- | ||
|
||
- name: Cocoapods install | ||
- name: Cocoapods install | ||
run: | | ||
bundle exec fastlane run cocoapods | ||
- name: Setup Java 11 | ||
- name: Setup Java 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
distribution: 'temurin' | ||
java-version: '11' | ||
|
||
- name: WireMock setup | ||
- name: WireMock setup | ||
run: | | ||
curl https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-jre8-standalone/2.27.0/wiremock-jre8-standalone-2.27.0.jar -o wiremock.jar -s | ||
bundle exec iostrust add ./wiremock/cert/wiremock.crt | ||
java -jar wiremock.jar --https-port 9099 --root-dir wiremock --https-keystore wiremock/cert/wiremock.jks --keystore-password password --verbose --global-response-templating & | ||
- name: Format check | ||
- name: Format check | ||
run: | | ||
bundle exec fastlane format_check | ||
- name: Test | ||
- name: Test | ||
run: | | ||
bundle exec fastlane test | ||
bundle exec fastlane test_0 | ||
- name: Tests reports upload | ||
- name: Tests reports upload | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: tests-reports | ||
path: "fastlane/test_output" | ||
name: tests-reports | ||
path: "fastlane/test_output" | ||
|
||
test_1: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Ruby & Bundle setup | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
bundler-cache: true | ||
|
||
- name: Cocoapods cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: Pods | ||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pods- | ||
|
||
- name: Cocoapods install | ||
run: | | ||
bundle exec fastlane run cocoapods | ||
- name: Setup Java 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
|
||
- name: WireMock setup | ||
run: | | ||
curl https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-jre8-standalone/2.27.0/wiremock-jre8-standalone-2.27.0.jar -o wiremock.jar -s | ||
bundle exec iostrust add ./wiremock/cert/wiremock.crt | ||
java -jar wiremock.jar --https-port 9099 --root-dir wiremock --https-keystore wiremock/cert/wiremock.jks --keystore-password password --verbose --global-response-templating & | ||
- name: Test | ||
run: | | ||
bundle exec fastlane test_1 | ||
- name: Tests reports upload | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: tests-reports | ||
path: "fastlane/test_output" | ||
|
||
test_2: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Ruby & Bundle setup | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
bundler-cache: true | ||
|
||
- name: Cocoapods cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: Pods | ||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pods- | ||
|
||
- name: Cocoapods install | ||
run: | | ||
bundle exec fastlane run cocoapods | ||
- name: Setup Java 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
|
||
- name: WireMock setup | ||
run: | | ||
curl https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-jre8-standalone/2.27.0/wiremock-jre8-standalone-2.27.0.jar -o wiremock.jar -s | ||
bundle exec iostrust add ./wiremock/cert/wiremock.crt | ||
java -jar wiremock.jar --https-port 9099 --root-dir wiremock --https-keystore wiremock/cert/wiremock.jks --keystore-password password --verbose --global-response-templating & | ||
- name: Test | ||
run: | | ||
bundle exec fastlane test_2 | ||
- name: Tests reports upload | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: tests-reports | ||
path: "fastlane/test_output" | ||
|
||
|
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
Oops, something went wrong.