Skip to content

Commit

Permalink
add example github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Oct 25, 2023
1 parent e97b92d commit 00247c0
Showing 1 changed file with 16 additions and 30 deletions.
46 changes: 16 additions & 30 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: HTTP Request Action
name: Example of katana-ci-action usage

on:
push:
branches:
- main # Adjust to your branch name
- main

jobs:
katana-ci-startup:
Expand All @@ -13,34 +13,20 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
- name: Startup Katana CI instance
id: katanaci
uses: ArkProjectNFTs/katana-ci-action@v1
with:
node-version: 14
api-url: ${{ env.KATANA_CI_URL }}
api-key: ${{ env.KATANA_CI_KEY }}

- name: Make HTTP Request
env:
API_KEY: ${{ secrets.API_KEY }}
API_URL: ${{ secrets.API_URL }}
run: |
NAME=$(curl -s -H "Authorization: Bearer $KATANA_CI_KEY" $KATANA_CI_URL/start)
echo "Response: $RESPONSE"
echo "API_RESPONSE=$RESPONSE" >> $GITHUB_ENV
- name: Use Response in Another Job
run: |
echo "The response is $API_RESPONSE"
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2

test:
runs-on: ubuntu-latest-4-cores
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: |
cargo test --all-features
- name: Run cargo test
uses: actions-rs/cargo@v1
env:
STARKNET_RPC: ${{ steps.katanaci.outputs.rpc }}
with:
command: run
args: --example e2e

0 comments on commit 00247c0

Please sign in to comment.