Using iso string instead of date #68
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: Run tests againts staging AVS | |
run: | | |
yarn build | |
yarn test |