fix test case that assert the default wallet #87
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: Run tests against staging on PR | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
staging-test: | |
runs-on: ubuntu-latest | |
environment: test # The below environment variables are only available in the test environment | |
env: | |
TEST_API_KEY: ${{ secrets.TEST_API_KEY }} | |
TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} | |
TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} | |
ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} | |
ENDPOINT: ${{ vars.ENDPOINT }} | |
CHAIN_ENDPOINT: ${{ secrets.CHAIN_ENDPOINT }} | |
# On staging env, when test run it may not cleanup data properly for multiple reasons. | |
# In the next run, especially on pagination test, the assumption about data is wrong. | |
# For those kind of particular test, we want to ensure a 100% unique salt across run | |
# One way to do so, is get this run_id from github action and use it as salt | |
# On local dev, we just default to a hard code number in the test to isolate its. data | |
# on local test is continously wipe out on every run so it isn't a problem like staging | |
# We may want to sweep and delete task data on those test account | |
RUN_ID: ${{ github.run_id }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Debug environment variables | |
run: | | |
echo "TOKEN_CONTRACT: $TOKEN_CONTRACT" | |
echo "ORACLE_CONTRACT: $ORACLE_CONTRACT" | |
echo "ENDPOINT: $ENDPOINT" | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Test Authentication | |
run: yarn test:auth | |
- name: Test Create Workflow | |
run: yarn test:createWorkflow | |
- name: Test Get Workflow | |
run: yarn test:getWorkflow | |
- name: Test Get Workflows | |
run: yarn test:getWorkflows | |
- name: Test Cancel Workflow | |
run: yarn test:cancelWorkflow | |
- name: Test Delete Workflow | |
run: yarn test:deleteWorkflow | |
- name: Test Get Executions | |
run: yarn test:getExecutions | |
- name: Test Get Wallet | |
run: yarn test:getWallet | |
- name: Test Get Wallets | |
run: yarn test:getWallets | |
- name: Test Secret | |
run: yarn test:secret |