Skip to content

Commit

Permalink
Suggested changes made.
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirfolio3 committed Apr 20, 2022
1 parent b6a9634 commit 39b7edd
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 57 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
required: true
TRAVIS_COM_TOKEN:
required: true
PREP:
required: false
RELEASE:
required: false

jobs:
integration_tests:
Expand Down Expand Up @@ -41,7 +37,6 @@ jobs:
TESTAPP_BRANCH: master
GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }}
TRAVIS_EVENT_TYPE: ${{ github.event_name }}
GITHUB_CONTEXT: ${{ toJson(github) }}
TRAVIS_REPO_SLUG: ${{ github.repository }}
TRAVIS_PULL_REQUEST_SLUG: ${{ github.repository }}
UPSTREAM_REPO: ${{ github.repository }}
Expand All @@ -52,9 +47,5 @@ jobs:
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}
EVENT_MESSAGE: ${{ github.event.message }}
HOME: 'home/runner'
PREP: ${{ secrets.PREP }}
RELEASE: ${{ secrets.RELEASE }}
if: "${{ env.PREP == '' && env.RELEASE == '' }}"
run: |
echo "$GITHUB_CONTEXT"
home/runner/travisci-tools/trigger-script-with-status-update.sh
home/runner/travisci-tools/trigger-script-with-status-update.sh
2 changes: 1 addition & 1 deletion .github/workflows/lint_markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
lint_markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/prepare_for_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,11 @@ on:
secrets:
CI_USER_TOKEN:
required: true
PREP:
required: false

jobs:
prepare_for_release:
runs-on: macos-latest
steps:
- name: set SDK Branch if PR
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "SDK_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
echo "TRAVIS_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
- name: set SDK Branch if not pull request
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "SDK_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
echo "TRAVIS_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
- uses: maxim-lobanov/setup-xcode@v1
- uses: actions/checkout@v3
with:
Expand All @@ -32,13 +20,12 @@ jobs:
VERSION: 3.10.1
HOME: 'home/runner'
TRAVIS_REPO_SLUG: ${{ github.repository }}
TRAVIS_BRANCH: ${{ github.ref_name }}
GITHUB_USER: optibot
GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }}
PREP: ${{ secrets.PREP }}
if: "${{ env.PREP == 'true' }}"
run: |
gem install cocoapods -v '1.9.3'
Scripts/run_prep.sh
- name: Check prepare for release failure
if: steps.prepare_for_release.conclusion == 'failure'
run: cat /tmp/build.out
run: cat /tmp/build.out
2 changes: 1 addition & 1 deletion .github/workflows/source_clear_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
source_clear:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Source clear scan
env:
SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }}
Expand Down
31 changes: 11 additions & 20 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,26 @@ on:
branches: [ master ]
workflow_dispatch:
inputs:
SNAPSHOT:
PREP:
required: false
type: boolean
description: Set SNAPSHOT true to publish
description: prepare to release
RELEASE:
required: false
type: boolean
description: release

jobs:

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

integration_tests:
if: ${{ github.event.inputs.SNAPSHOT != 'true' }}
if: "${{ github.event.inputs.PREP == '' && github.event.inputs.RELEASE == '' }}"
uses: optimizely/swift-sdk/.github/workflows/integration_tests.yml@yasir/gitAction
secrets:
CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }}
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}
PREP: ${{ secrets.PREP }}
RELEASE: ${{ secrets.RELEASE }}

lint:
runs-on: macos-latest
Expand All @@ -41,31 +43,21 @@ jobs:
curl -sSL https://download.sourceclear.com/ci.sh | bash
unittests:
if: "${{ github.event.inputs.PREP == '' && github.event.inputs.RELEASE == '' }}"
uses: optimizely/swift-sdk/.github/workflows/unit_tests.yml@yasir/gitAction
secrets:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
PREP: ${{ secrets.PREP }}
RELEASE: ${{ secrets.RELEASE }}

prepare_for_release:
if: "${{ github.event.inputs.SNAPSHOT == 'true' && github.event_name == 'workflow_dispatch' }}"
if: "${{ github.event.inputs.PREP == 'true' && github.event_name == 'workflow_dispatch' }}"
uses: optimizely/swift-sdk/.github/workflows/prepare_for_release.yml@yasir/gitAction
secrets:
CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }}
PREP: ${{ secrets.PREP }}

release:
if: "${{github.event.inputs.SNAPSHOT == 'true' && github.event_name == 'workflow_dispatch' }}"
if: "${{github.event.inputs.RELEASE == 'true' && github.event_name == 'workflow_dispatch' }}"
runs-on: macos-latest
steps:
- name: set SDK Branch if PR
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "TRAVIS_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
- name: set SDK Branch if not pull request
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "TRAVIS_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
Expand All @@ -74,8 +66,7 @@ jobs:
env:
VERSION: 3.10.1
GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }}
RELEASE: ${{ secrets.RELEASE }}
if: "${{ env.RELEASE == 'true' }}"
TRAVIS_BRANCH: ${{ github.ref_name }}
run: |
gem install cocoapods -v '1.9.3'
Scripts/run_release.sh
11 changes: 1 addition & 10 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ on:
secrets:
COVERALLS_TOKEN:
required: true
PREP:
required: false
RELEASE:
required: false

jobs:
unittests:
Expand Down Expand Up @@ -53,17 +49,13 @@ jobs:
- name: set SDK Branch if PR
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "SDK_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
echo "TRAVIS_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
- name: set SDK Branch if not pull request
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "SDK_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
echo "TRAVIS_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
- id: unit_tests
env:
PREP: ${{ secrets.PREP }}
RELEASE: ${{ secrets.RELEASE }}
COVERAGE_DIR: ./COVERAGE
SCHEME: ${{ matrix.scheme }}
TEST_SDK: ${{ matrix.test_sdk }}
Expand All @@ -73,7 +65,6 @@ jobs:
SIMULATOR_XCODE_VERSION: ${{ matrix.simulator_xcode_version }}
NAME: ${{ matrix.device }}
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
if: "${{ env.PREP == '' && env.RELEASE == '' }}"
run: |
gem install coveralls-lcov
gem install cocoapods -v '1.9.3'
Expand All @@ -92,4 +83,4 @@ jobs:
if: steps.unit_tests.outcome == 'success'
run: |
Scripts/upload_coveralls.sh
sleep 5
sleep 5

0 comments on commit 39b7edd

Please sign in to comment.