Skip to content

Commit bcb41ad

Browse files
authored
Add acceptance tests (#89)
tests(contract): add acceptance tests Add contract based acceptance tests. fix(api-client): fix hostname encoding Fix issue because of which it is impossible to set hostaname with specific port number.
1 parent 02dd5d3 commit bcb41ad

28 files changed

+2113
-111
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Acceptance tests
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
acceptance-tests:
9+
name: Run Acceptance tests
10+
runs-on: macos-11
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
- name: Cache installed Pods
15+
uses: actions/cache@v2
16+
with:
17+
path: Pods
18+
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
19+
restore-keys: |
20+
${{ runner.os }}-pods-
21+
- name: Cache installed Gems
22+
uses: actions/cache@v2
23+
with:
24+
path: vendor/bundle
25+
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
26+
restore-keys: |
27+
${{ runner.os }}-gem-
28+
- name: Checkout mock-server action
29+
uses: actions/checkout@v2
30+
with:
31+
repository: pubnub/client-engineering-deployment-tools
32+
ref: v1
33+
token: ${{ secrets.GH_TOKEN }}
34+
path: deployment-tools
35+
- name: Run mock server action
36+
uses: ./deployment-tools/actions/mock-server
37+
with:
38+
token: ${{ secrets.GH_TOKEN }}
39+
features-path: Tests/PubNubContractTest/Features/
40+
- name: Preapre Xcode environment
41+
run: |
42+
bundle install --jobs=3 --retry=3
43+
pod install
44+
- name: Run stable acceptance tests
45+
run: |
46+
bundle exec fastlane contract_test --env contract
47+
mv Results/CucumberishTestResults-PubNubContractTests.json Results/main.json
48+
- name: Run beta acceptance tests
49+
run: |
50+
bundle exec fastlane contract_test --env contract-beta && FASTLANE_EXITCODE="${PIPESTATUS[0]}"
51+
mv Results/CucumberishTestResults-PubNubContractTestsBeta.json Results/beta.json
52+
- name: Upload acceptance tests reports
53+
uses: actions/upload-artifact@v2
54+
with:
55+
name: acceptance-test-reports
56+
path: Results/*.json
57+
retention-days: 7

.travis.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
language: objective-c
2-
os: osx
32
osx_image: xcode12
43
rvm: 2.6.6
4+
os: osx
5+
56
cache:
67
bundler: true
8+
cocoapods: true
79
directories:
810
- .build # Swift Package Manager
911
- /Users/travis/.rvm/ # RVM
12+
1013
before_install:
11-
- gem install -v 2.1.4 bundler
14+
- sudo gem update --system
15+
1216
stages:
1317
- name: "Unit Tests"
1418
if: type = push
1519
- name: Validate
1620
if: type = pull_request
21+
1722
jobs:
1823
include:
1924
- stage: Validate
@@ -32,6 +37,7 @@ jobs:
3237
- name: tvOS
3338
before_script: xcrun simctl list -j
3439
script: bundle exec fastlane test --env tvos
40+
3541
before_cache:
3642
- rvm cleanup all
3743
- bundle clean

0 commit comments

Comments
 (0)