8000 chore: removed travis yml and added git action support by mnoman09 · Pull Request #469 · optimizely/java-sdk · GitHub
[go: up one dir, main page]

Skip to content

chore: removed travis yml and added git action support #469

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

Merged
merged 27 commits into from
Apr 14, 2022
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
using reusable workflow
  • Loading branch information
mnoman09 authored Apr 4, 2022
commit 4d56a251093a1877695a60558b90d1c618b71820
113 changes: 32 additions & 81 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,91 +29,42 @@ jobs:
run: find . -type f -name '*.md' -exec awesome_bot {} \;

integration_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
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 }}" > 8000 > $GITHUB_ENV
echo "TRAVIS_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Trigger build
env:
SDK: java
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
uses: optimizely/java-sdk/.github/workflows/integration_test.yml@mnoman/gitAction
with:
BUILD_NUMBER: ${{ github.run_id }}
GITHUB_CONTEXT: ${{ toJson(github) }}
TRAVIS_EVENT_TYPE: ${{ github.event_name }}
REPOSITORY: ${{ github.repository }}
SHA: ${{ github.sha }}
TRAVIS_PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }}
TRAVIS_PULL_REQUEST: ${{ github.event.pull_request.number }}
EVENT_MESSAGE: ${{ github.event_name }}
HEAD_REF: ${{ github.head_ref }}
REF_NAME: ${{ github.ref_name }}
secrets:
CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }}
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}

fullstack_production_suite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
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: java
FULLSTACK_TEST_REPO: ProdTesting
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"
uses: optimizely/java-sdk/.github/workflows/integration_test.yml@mnoman/gitAction
with:
FULLSTACK_TEST_REPO: ProdTesting
BUILD_NUMBER: ${{ github.run_id }}
GITHUB_CONTEXT: ${{ toJson(github) }}
TRAVIS_EVENT_TYPE: ${{ github.event_name }}
REPOSITORY: ${{ github.repository }}
SHA: ${{ github.sha }}
TRAVIS_PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }}
TRAVIS_PULL_REQUEST: ${{ github.event.pull_request.number }}
EVENT_MESSAGE: ${{ github.event_name }}
HEAD_REF: ${{ github.head_ref }}
REF_NAME: ${{ github.ref_name }}
secrets:
CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }}
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}
home/runner/travisci-tools/trigger-script-with-status-update.sh
test:
runs-on: ubuntu-latest
runs-on: macos-latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why macos?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this is not fixed yet.

strategy:
fail-fast: false
matrix:
Expand Down
0