Merge pull request #74 from xiezhenouc/main #184
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
# 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 Unittest | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment to run tests against' | |
default: develop | |
type: choice | |
options: | |
- develop | |
- prod | |
push: | |
branches: [ main ] | |
pull_request_target: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
pip install ecdsa | |
pip install parameterized | |
- name: run testcase | |
env: | |
ENV: "${{ github.event.inputs.environment == 'prod' && 'prod' || 'develop'}}" | |
SECRET: "${{ github.event.inputs.environment == 'prod' && secrets.PRODSECRET || secrets.DEVELOPSECRET}}" | |
Web3SECRET: "${{secrets.DEVELOPWEB3SECRET}}" | |
MPCSECRET: "${{secrets.DEVELOPMPCSECRET}}" | |
run: python tests/run_test.py --api_secret $SECRET --mpc_api_secret $MPCSECRET | |