Skip to content

Commit

Permalink
Set environmental variables in CI
Browse files Browse the repository at this point in the history
commit-id:c494512a

Fix workflow file
  • Loading branch information
tomek0123456789 committed Apr 11, 2024
1 parent ec803e2 commit dc35f10
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
test-forge-e2e:
name: Test Forge / E2E Tests
runs-on: ubuntu-latest
env:
RPC_URL: ${{ secrets.RPC_URL }}
steps:
- name: Extract branch name
if: github.event_name != 'pull_request'
Expand All @@ -42,6 +44,14 @@ jobs:
if: github.event_name == 'pull_request'
run: echo "REPO_NAME=$(echo ${{ github.event.pull_request.head.repo.full_name }}.git)" >> $GITHUB_ENV

- name: Set RPC_URL for foundry-rs/stakrnet-foundry
if: ${{ github.event.pull_request.head.repo.full_name == 'foundry-rs/starknet-foundry' }}
run: echo "RPC_URL=$(echo ${{ secrets.RPC_URL }}:7070)" >> $GITHUB_ENV

- name: Set RPC_URL for forks
if: ${{ github.event.pull_request.head.repo.full_name != 'foundry-rs/starknet-foundry' }}
run: echo "RPC_URL=$(echo ${{ secrets.RPC_URL }})" >> $GITHUB_ENV

- name: Print repo name
run: echo 'The repo name is' $REPO_NAME

Expand Down Expand Up @@ -72,6 +82,14 @@ jobs:
name: Test Cheatnet
runs-on: ubuntu-latest
steps:
- name: Set RPC_URL for foundry-rs/stakrnet-foundry
if: ${{ github.event.pull_request.head.repo.full_name == 'foundry-rs/starknet-foundry' }}
run: echo "RPC_URL=$(echo ${{ secrets.RPC_URL }}:7070)" >> $GITHUB_ENV

- name: Set RPC_URL for forks
if: ${{ github.event.pull_request.head.repo.full_name != 'foundry-rs/starknet-foundry' }}
run: echo "RPC_URL=$(echo ${{ secrets.RPC_URL }})" >> $GITHUB_ENV

- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ jobs:
- name: Smoke test
shell: bash
env:
RPC_URL: ${{ secrets.CHEATNET_RPC_URL }}
RPC_URL: ${{ secrets.RPC_URL }}
run: |
BINARY_PATH="${{ env.BINARY_PATH }}"
BINARY_PATH="${BINARY_PATH%.tar.gz}"
Expand Down

0 comments on commit dc35f10

Please sign in to comment.