Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit 60bea96

Browse files
committed
Extract action
1 parent 473f620 commit 60bea96

File tree

3 files changed

+52
-15
lines changed

3 files changed

+52
-15
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 'Test SDK'
2+
description: 'Unit and Universal Tests'
3+
inputs:
4+
test_data_branch:
5+
type: string
6+
description: The branch in sdk-test-data to target for testcase files
7+
required: false
8+
default: main
9+
sdk_branch:
10+
type: string
11+
description: The branch of the SDK to test
12+
required: false
13+
default: main
14+
15+
runs:
16+
using: composite
17+
steps:
18+
- name: Display Testing Details
19+
shell: bash
20+
run: |
21+
echo "Running SDK Test using"
22+
echo "Test Data: sdk-test-data@${TEST_DATA_BRANCH_NAME}"
23+
echo "SDK Branch: python-sdk@${SDK_BRANCH_NAME}"
24+
env:
25+
SDK_BRANCH_NAME: ${{ inputs.sdk_branch }}
26+
TEST_DATA_BRANCH_NAME: ${{ inputs.test_data_branch }}
27+
28+
- uses: "actions/checkout@v2"
29+
with:
30+
repository: Eppo-exp/python-sdk
31+
ref: ${{ inputs.sdk_branch }}
32+
- uses: "actions/setup-python@v2"
33+
with:
34+
python-version: '3.9.x'
35+
- name: "Install dependencies"
36+
shell: bash
37+
run: |
38+
python -VV
39+
python -m pip install --upgrade pip setuptools wheel
40+
python -m pip install -r requirements.txt
41+
python -m pip install -r requirements-test.txt
42+
- name: "Run tests"
43+
shell: bash
44+
run: make test branchName=$BRANCH
45+
env:
46+
BRANCH: ${{ inputs.test_data_branch }}

.github/workflows/test-and-lint-sdk.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,6 @@ jobs:
5050
run-tests-with-tox:
5151
runs-on: ubuntu-latest
5252
steps:
53-
- uses: "actions/checkout@v2"
54-
- uses: "actions/setup-python@v2"
55-
with:
56-
python-version: '3.9.x'
57-
- name: "Install dependencies"
58-
run: |
59-
python -VV
60-
python -m pip install --upgrade pip setuptools wheel
61-
python -m pip install -r requirements.txt
62-
python -m pip install -r requirements-test.txt
63-
- name: 'Set up GCP SDK to download test data'
64-
uses: 'google-github-actions/setup-gcloud@v0'
65-
- name: "Run tests"
66-
run: make test
53+
- uses: Eppo-exp/python-sdk/.github/actions/action-test@tp/workflows/remote
54+
with:
55+
sdk_branch: ${{ github.head_ref || github.ref_name || 'main' }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ __pycache__
66
.tox/
77
test-data
88
venv/
9-
.DS_Store
9+
.DS_Store
10+
.venv
11+
.idea

0 commit comments

Comments
 (0)