RPC Method Scafolding for "generate_mock_event" #234
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- synchronize | |
merge_group: | |
types: [checks_requested] | |
branches: | |
- develop | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-python: | |
name: build-python / x86_64 / ${{ matrix.os }} / Python${{ matrix.python }} | |
if: github.repository_owner == 'awslabs' | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
python: | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.11" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Zion Python Client | |
run: | | |
cd python-client | |
pip install build | |
make copy-service-source-for-sdist | |
make build-client | |
- name: Test | |
shell: bash | |
run: | | |
ZION_VERSION=$(python -c "import pkg_resources;print(pkg_resources.get_distribution('zion').version)") | |
[ -f ./python-client/dist/zion-${ZION_VERSION}.tar.gz ] | |
python -c "import zion; from zion import Zion; z = Zion()" | |
test: | |
if: github.repository_owner == 'awslabs' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install Mockery | |
run: go install github.com/vektra/mockery/v2@v2.30.1 | |
- name: Run tests | |
run: make test | |
staticcheck: | |
if: github.repository_owner == 'awslabs' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install Mockery | |
run: go install github.com/vektra/mockery/v2@v2.30.1 | |
- name: Generate Mocks | |
run: make generate-mocks | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.51.2 | |
python_client_unit_test: | |
if: github.repository_owner == 'awslabs' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.7" | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Zion Python Client | |
run: | | |
cd python-client | |
pip install build | |
make copy-service-source-for-sdist | |
make init | |
- name: Run unit test | |
run: | | |
cd python-client | |
make unit-test | |
integration_test: | |
if: github.repository_owner == 'awslabs' | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
AWS_REGION: "us-east-1" | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.7" | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.CI_IAM_ROLE_ARN }} | |
role-session-name: CiIntegTests | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Run integration tests | |
run: make integ-test | |
- name: Set up Zion Python Client | |
run: | | |
cd python-client | |
pip install build | |
make copy-service-source-for-sdist | |
make init | |
- name: Run Python Client integration test | |
run: | | |
cd python-client | |
make integ-test | |
python_client_contract_test: | |
if: github.repository_owner == 'awslabs' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" # min Python version to run the contract test | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Zion Python Client | |
run: | | |
cd python-client | |
pip install build | |
make copy-service-source-for-sdist | |
make init | |
- name: Generate RPC specs | |
run: | | |
rm schema/rpc-specs.json | |
make generate-rpc-spec | |
- name: Run contract test | |
run: | | |
cd python-client | |
make contract-test |