-
Notifications
You must be signed in to change notification settings - Fork 36
chore: removed travis yml and added git action support #380
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
Changes from all commits
829c088
e0428e6
5e0ffbf
adc8342
efb3596
7649e93
7dce505
626a035
956b033
19cc4d3
662366f
380e59f
10c1cdf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: Reusable action of running integration of production suite | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| FULLSTACK_TEST_REPO: | ||
| required: false | ||
| type: string | ||
| secrets: | ||
| CI_USER_TOKEN: | ||
| required: true | ||
| TRAVIS_COM_TOKEN: | ||
| required: true | ||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| # You should create a personal access token and store it in your repository | ||
| token: ${{ secrets.CI_USER_TOKEN }} | ||
| repository: 'optimizely/travisci-tools' | ||
| path: 'home/runner/travisci-tools' | ||
| ref: 'master' | ||
| - name: set SDK Branch if PR | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| run: | | ||
| echo "SDK_BRANCH=${{ github.head_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 | ||
| - name: Trigger build | ||
| env: | ||
| SDK: python | ||
| FULLSTACK_TEST_REPO: ${{ inputs.FULLSTACK_TEST_REPO }} | ||
| BUILD_NUMBER: ${{ github.run_id }} | ||
| 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 }} | ||
| TRAVIS_COMMIT: ${{ github.sha }} | ||
| TRAVIS_PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} | ||
| TRAVIS_PULL_REQUEST: ${{ github.event.pull_request.number }} | ||
| UPSTREAM_SHA: ${{ github.sha }} | ||
| TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} | ||
| EVENT_MESSAGE: ${{ github.event.message }} | ||
| HOME: 'home/runner' | ||
| run: | | ||
| echo "$GITHUB_CONTEXT" | ||
| home/runner/travisci-tools/trigger-script-with-status-update.sh |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
|
||
| name: Python package | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| jobs: | ||
| lint_markdown_files: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: '2.6' | ||
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
| - name: Install gem | ||
| run: | | ||
| gem install awesome_bot | ||
| - name: Run tests | ||
| run: find . -type f -name '*.md' -exec awesome_bot {} \; | ||
|
|
||
| linting: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python 3.9 | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: 3.9 | ||
| # flake8 version should be same as the version in requirements/test.txt | ||
| # to avoid lint errors on CI | ||
| - name: pip install flak8 | ||
| run: pip install flake8>=4.1.0 | ||
| - name: Lint with flake8 | ||
| run: | | ||
| flake8 | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does it mean?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comments are written above for clarification. These lines were generated automatically so I didn't removed it as it seemed useful |
||
|
|
||
| integration_tests: | ||
| uses: optimizely/python-sdk/.github/workflows/integration_test.yml@master | ||
msohailhussain marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| secrets: | ||
| CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }} | ||
| TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} | ||
|
|
||
| fullstack_production_suite: | ||
| uses: optimizely/python-sdk/.github/workflows/integration_test.yml@master | ||
msohailhussain marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| with: | ||
| FULLSTACK_TEST_REPO: ProdTesting | ||
| secrets: | ||
| CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }} | ||
| TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} | ||
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["pypy-3.7-v7.3.5", "3.7", "3.8", "3.9", "3.10.0"] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements/core.txt;pip install -r requirements/test.txt | ||
| - name: Test with pytest | ||
| run: | | ||
| pytest --cov=optimizely | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: Source clear | ||
|
|
||
| on: | ||
| schedule: | ||
| # Runs "weekly" | ||
| - cron: '0 0 * * 0' | ||
|
|
||
| jobs: | ||
| source_clear: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Source clear scan | ||
| env: | ||
| SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }} | ||
| run: curl -sSL https://download.sourceclear.com/ci.sh | bash -s – scan |
This file was deleted.
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.
i don't see this line in travis?