Skip to content

Commit

Permalink
chore(ci): add a tapir ci job
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-roslaniec committed Dec 21, 2023
1 parent 87b945d commit 70b5794
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/lynx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ on:
schedule:
- cron: "0 * * * *" # Every hour
pull_request:
# branches:
# - main
# - development
# - epic-*
workflow_dispatch:

env: # TODO: Use variables when GH supports it for forks. See https://github.com/orgs/community/discussions/44322
# TODO: Use variables when GH supports it for forks. See https://github.com/orgs/community/discussions/44322
env:
RPC_PROVIDER_URL: "https://polygon-mumbai.infura.io/v3/3747007a284045d483c342fb39889a30"
ENCRYPTOR_PRIVATE_KEY: "0x900edb9e8214b2353f82aa195e915128f419a92cfb8bbc0f4784f10ef4112b86"
CONSUMER_PRIVATE_KEY: "0xf307e165339cb5deb2b8ec59c31a5c0a957b8e8453ce7fe8a19d9a4c8acf36d4"
RITUAL_ID: "0"

jobs:
build_project:
networks:
name: '🔎 Lynx Testnet Example on Node ${{ matrix.node }} and ${{ matrix.os }}'

runs-on: ${{ matrix.os }}
Expand All @@ -37,19 +35,20 @@ jobs:
node-version: ${{ matrix.node }}
cache: 'pnpm'

- name: Lynx testnet node-js script installation
- name: Install dependencies
working-directory: ./examples/taco/nodejs
run: pnpm install

- name: Lynx testnet node-js script environment
- name: Setup environment
working-directory: ./examples/taco/nodejs
# TODO: Use variables when GH supports it for forks. See https://github.com/orgs/community/discussions/44322
run: |
echo RPC_PROVIDER_URL=$RPC_PROVIDER_URL > .env
echo ENCRYPTOR_PRIVATE_KEY=$ENCRYPTOR_PRIVATE_KEY >> .env
echo CONSUMER_PRIVATE_KEY=$CONSUMER_PRIVATE_KEY >> .env
echo RITUAL_ID=$RITUAL_ID >> .env
echo DOMAIN=lynx >> .env
- name: Lynx testnet node-js script execution
id: lynx_script
- name: Run taco/nodejs script
working-directory: ./examples/taco/nodejs
run: pnpm start
56 changes: 56 additions & 0 deletions .github/workflows/tapir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: '🔎 Tapir Testnet Example'

on:
schedule:
- cron: "0 * * * *" # Every hour
pull_request:
branches:
- main
workflow_dispatch:

# TODO: Use variables when GH supports it for forks. See https://github.com/orgs/community/discussions/44322
env:
RPC_PROVIDER_URL: "https://polygon-mumbai.infura.io/v3/3747007a284045d483c342fb39889a30"
ENCRYPTOR_PRIVATE_KEY: "0x900edb9e8214b2353f82aa195e915128f419a92cfb8bbc0f4784f10ef4112b86"
CONSUMER_PRIVATE_KEY: "0xf307e165339cb5deb2b8ec59c31a5c0a957b8e8453ce7fe8a19d9a4c8acf36d4"
RITUAL_ID: "5"

jobs:
networks:
name: '🔎 Tapir Testnet Example on Node ${{ matrix.node }} and ${{ matrix.os }}'

runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [ '18.x' ]
os: [ ubuntu-latest ]

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
with:
version: 8.1

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'

- name: Install dependencies
working-directory: ./examples/taco/nodejs
run: pnpm install

- name: Setup environment
working-directory: ./examples/taco/nodejs
# TODO: Use variables when GH supports it for forks. See https://github.com/orgs/community/discussions/44322
run: |
echo RPC_PROVIDER_URL=$RPC_PROVIDER_URL > .env
echo ENCRYPTOR_PRIVATE_KEY=$ENCRYPTOR_PRIVATE_KEY >> .env
echo CONSUMER_PRIVATE_KEY=$CONSUMER_PRIVATE_KEY >> .env
echo RITUAL_ID=$RITUAL_ID >> .env
echo DOMAIN=tapir >> .env
- name: Run taco/nodejs script
working-directory: ./examples/taco/nodejs
run: pnpm start

0 comments on commit 70b5794

Please sign in to comment.