Skip to content

Commit 39b7edd

Browse files
committed
Suggested changes made.
1 parent b6a9634 commit 39b7edd

File tree

6 files changed

+17
-57
lines changed

6 files changed

+17
-57
lines changed

.github/workflows/integration_tests.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ on:
77
required: true
88
TRAVIS_COM_TOKEN:
99
required: true
10-
PREP:
11-
required: false
12-
RELEASE:
13-
required: false
1410

1511
jobs:
1612
integration_tests:
@@ -41,7 +37,6 @@ jobs:
4137
TESTAPP_BRANCH: master
4238
GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }}
4339
TRAVIS_EVENT_TYPE: ${{ github.event_name }}
44-
GITHUB_CONTEXT: ${{ toJson(github) }}
4540
TRAVIS_REPO_SLUG: ${{ github.repository }}
4641
TRAVIS_PULL_REQUEST_SLUG: ${{ github.repository }}
4742
UPSTREAM_REPO: ${{ github.repository }}
@@ -52,9 +47,5 @@ jobs:
5247
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}
5348
EVENT_MESSAGE: ${{ github.event.message }}
5449
HOME: 'home/runner'
55-
PREP: ${{ secrets.PREP }}
56-
RELEASE: ${{ secrets.RELEASE }}
57-
if: "${{ env.PREP == '' && env.RELEASE == '' }}"
5850
run: |
59-
echo "$GITHUB_CONTEXT"
60-
home/runner/travisci-tools/trigger-script-with-status-update.sh
51+
home/runner/travisci-tools/trigger-script-with-status-update.sh

.github/workflows/lint_markdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
lint_markdown:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- name: Set up Ruby
1111
uses: ruby/setup-ruby@v1
1212
with:

.github/workflows/prepare_for_release.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,11 @@ on:
55
secrets:
66
CI_USER_TOKEN:
77
required: true
8-
PREP:
9-
required: false
108

119
jobs:
1210
prepare_for_release:
1311
runs-on: macos-latest
1412
steps:
15-
- name: set SDK Branch if PR
16-
if: ${{ github.event_name == 'pull_request' }}
17-
run: |
18-
echo "SDK_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
19-
echo "TRAVIS_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
20-
- name: set SDK Branch if not pull request
21-
if: ${{ github.event_name != 'pull_request' }}
22-
run: |
23-
echo "SDK_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
24-
echo "TRAVIS_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
2513
- uses: maxim-lobanov/setup-xcode@v1
2614
- uses: actions/checkout@v3
2715
with:
@@ -32,13 +20,12 @@ jobs:
3220
VERSION: 3.10.1
3321
HOME: 'home/runner'
3422
TRAVIS_REPO_SLUG: ${{ github.repository }}
23+
TRAVIS_BRANCH: ${{ github.ref_name }}
3524
GITHUB_USER: optibot
3625
GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }}
37-
PREP: ${{ secrets.PREP }}
38-
if: "${{ env.PREP == 'true' }}"
3926
run: |
4027
gem install cocoapods -v '1.9.3'
4128
Scripts/run_prep.sh
4229
- name: Check prepare for release failure
4330
if: steps.prepare_for_release.conclusion == 'failure'
44-
run: cat /tmp/build.out
31+
run: cat /tmp/build.out

.github/workflows/source_clear_cron.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
source_clear:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
- name: Source clear scan
1616
env:
1717
SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }}

.github/workflows/swift.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,26 @@ on:
77
branches: [ master ]
88
workflow_dispatch:
99
inputs:
10-
SNAPSHOT:
10+
PREP:
1111
required: false
1212
type: boolean
13-
description: Set SNAPSHOT true to publish
13+
description: prepare to release
14+
RELEASE:
15+
required: false
16+
type: boolean
17+
description: release
1418

1519
jobs:
1620

1721
lint_markdown_files:
1822
uses: optimizely/swift-sdk/.github/workflows/lint_markdown.yml@yasir/gitAction
1923

2024
integration_tests:
21-
if: ${{ github.event.inputs.SNAPSHOT != 'true' }}
25+
if: "${{ github.event.inputs.PREP == '' && github.event.inputs.RELEASE == '' }}"
2226
uses: optimizely/swift-sdk/.github/workflows/integration_tests.yml@yasir/gitAction
2327
secrets:
2428
CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }}
2529
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}
26-
PREP: ${{ secrets.PREP }}
27-
RELEASE: ${{ secrets.RELEASE }}
2830

2931
lint:
3032
runs-on: macos-latest
@@ -41,31 +43,21 @@ jobs:
4143
curl -sSL https://download.sourceclear.com/ci.sh | bash
4244
4345
unittests:
46+
if: "${{ github.event.inputs.PREP == '' && github.event.inputs.RELEASE == '' }}"
4447
uses: optimizely/swift-sdk/.github/workflows/unit_tests.yml@yasir/gitAction
4548
secrets:
4649
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
47-
PREP: ${{ secrets.PREP }}
48-
RELEASE: ${{ secrets.RELEASE }}
4950

5051
prepare_for_release:
51-
if: "${{ github.event.inputs.SNAPSHOT == 'true' && github.event_name == 'workflow_dispatch' }}"
52+
if: "${{ github.event.inputs.PREP == 'true' && github.event_name == 'workflow_dispatch' }}"
5253
uses: optimizely/swift-sdk/.github/workflows/prepare_for_release.yml@yasir/gitAction
5354
secrets:
5455
CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }}
55-
PREP: ${{ secrets.PREP }}
5656

5757
release:
58-
if: "${{github.event.inputs.SNAPSHOT == 'true' && github.event_name == 'workflow_dispatch' }}"
58+
if: "${{github.event.inputs.RELEASE == 'true' && github.event_name == 'workflow_dispatch' }}"
5959
runs-on: macos-latest
6060
steps:
61-
- name: set SDK Branch if PR
62-
if: ${{ github.event_name == 'pull_request' }}
63-
run: |
64-
echo "TRAVIS_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
65-
- name: set SDK Branch if not pull request
66-
if: ${{ github.event_name != 'pull_request' }}
67-
run: |
68-
echo "TRAVIS_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
6961
- uses: actions/checkout@v3
7062
- uses: maxim-lobanov/setup-xcode@v1
7163
with:
@@ -74,8 +66,7 @@ jobs:
7466
env:
7567
VERSION: 3.10.1
7668
GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }}
77-
RELEASE: ${{ secrets.RELEASE }}
78-
if: "${{ env.RELEASE == 'true' }}"
69+
TRAVIS_BRANCH: ${{ github.ref_name }}
7970
run: |
8071
gem install cocoapods -v '1.9.3'
8172
Scripts/run_release.sh

.github/workflows/unit_tests.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ on:
55
secrets:
66
COVERALLS_TOKEN:
77
required: true
8-
PREP:
9-
required: false
10-
RELEASE:
11-
required: false
128

139
jobs:
1410
unittests:
@@ -53,17 +49,13 @@ jobs:
5349
- name: set SDK Branch if PR
5450
if: ${{ github.event_name == 'pull_request' }}
5551
run: |
56-
echo "SDK_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
5752
echo "TRAVIS_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
5853
- name: set SDK Branch if not pull request
5954
if: ${{ github.event_name != 'pull_request' }}
6055
run: |
61-
echo "SDK_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
6256
echo "TRAVIS_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
6357
- id: unit_tests
6458
env:
65-
PREP: ${{ secrets.PREP }}
66-
RELEASE: ${{ secrets.RELEASE }}
6759
COVERAGE_DIR: ./COVERAGE
6860
SCHEME: ${{ matrix.scheme }}
6961
TEST_SDK: ${{ matrix.test_sdk }}
@@ -73,7 +65,6 @@ jobs:
7365
SIMULATOR_XCODE_VERSION: ${{ matrix.simulator_xcode_version }}
7466
NAME: ${{ matrix.device }}
7567
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
76-
if: "${{ env.PREP == '' && env.RELEASE == '' }}"
7768
run: |
7869
gem install coveralls-lcov
7970
gem install cocoapods -v '1.9.3'
@@ -92,4 +83,4 @@ jobs:
9283
if: steps.unit_tests.outcome == 'success'
9384
run: |
9485
Scripts/upload_coveralls.sh
95-
sleep 5
86+
sleep 5

0 commit comments

Comments
 (0)