-
Notifications
You must be signed in to change notification settings - Fork 28
chore: removed travis yml and added git action support #300
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
21005c3
6735ba0
7469246
55741ea
77c6650
2d2d5ff
4626584
7585ad4
d056b9d
6ef3304
365c9fe
bf2bdbe
246b5ed
517080f
e3ae29e
0bc334d
4ffc5b9
83df171
bf24120
835c088
6656277
064e1d5
57e52b0
72787ea
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,56 @@ | ||
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 | ||
echo "TRAVIS_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: ruby | ||
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,19 @@ | ||
name: Reusable action of linting markdown files | ||
|
||
on: [workflow_call] | ||
|
||
jobs: | ||
lint: | ||
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 {} \; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Ruby | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
lint_markdown_files: | ||
uses: optimizely/ruby-sdk/.github/workflows/lint_markdown.yml@master | ||
|
||
integration_tests: | ||
uses: optimizely/ruby-sdk/.github/workflows/integration_test.yml@master | ||
secrets: | ||
CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }} | ||
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} | ||
|
||
fullstack_production_suite: | ||
uses: optimizely/ruby-sdk/.github/workflows/integration_test.yml@master | ||
with: | ||
FULLSTACK_TEST_REPO: ProdTesting | ||
secrets: | ||
CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }} | ||
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} | ||
|
||
unit_tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby: [ '2.3.7', '2.4.4', '2.5.1', '2.6.0' ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby ${{ matrix.ruby }} | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Run linting | ||
run: | | ||
bundle exec rubocop | ||
- name: Run unit tests | ||
run: | | ||
bundle exec rake spec | ||
- name: Run coveralls | ||
run: | | ||
bundle exec coveralls |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Source clear | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
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.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec| | |
spec.require_paths = ['lib'] | ||
|
||
spec.add_development_dependency 'bundler' | ||
spec.add_development_dependency 'coveralls' | ||
spec.add_development_dependency 'coveralls_reborn' | ||
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's the reason to change it. 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. Coveralls is last updated on Sep 9, 2021 and a newer and updated fork is coveralls_reborn. Coveralls is also not supported with git actions. |
||
spec.add_development_dependency 'rake' | ||
spec.add_development_dependency 'rspec' | ||
spec.add_development_dependency 'rubocop', '0.73.0' | ||
|
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.
remove it.