Skip to content

Commit

Permalink
fix: improve CI/CD workflow by removing invalid inputs and ensuring p…
Browse files Browse the repository at this point in the history
…roper indentation
  • Loading branch information
3th-Enjay committed Feb 28, 2025
1 parent c825a29 commit 1dcfd50
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ jobs:
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-
# Fixed: Removed invalid inputs and using rustup directly
- name: Install Rust toolchain
run: |
rustup toolchain install stable
Expand All @@ -50,7 +51,7 @@ jobs:
with:
path: ~/.cargo/bin/snforge
key: ${{ runner.os }}-snforge-0.33.0

- name: Install snforge
run: |
if ! command -v snforge &> /dev/null; then
Expand All @@ -61,15 +62,15 @@ jobs:
snforge@0.33.0
fi
echo "Installed snforge version: $(snforge --version)"
- name: Install dependencies
run: scarb clean && scarb fetch

- name: Build Starknet contracts
run: scarb build

- name: Run snforge tests
run: snforge test --workspace
run: snforge test --workspace

nextjs-build-and-test:
runs-on: ubuntu-latest
Expand All @@ -95,7 +96,7 @@ jobs:

- name: Build
run: npm run build
env: # Proper indentation here
env:
NEXT_PUBLIC_API_URL: ${{ github.event_name == 'pull_request' && 'dummy-api-url' || secrets.NEXT_PUBLIC_API_URL }}
OPENAI_API_KEY: ${{ github.event_name == 'pull_request' && 'dummy-key' || secrets.OPENAI_API_KEY }}
BRIAN_API_KEY: ${{ github.event_name == 'pull_request' && 'dummy-key' || secrets.BRIAN_API_KEY }}
Expand Down Expand Up @@ -136,4 +137,4 @@ jobs:
env:
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
BRIAN_API_KEY: ${{ secrets.BRIAN_API_KEY }}
BRIAN_API_KEY: ${{ secrets.BRIAN_API_KEY }}

0 comments on commit 1dcfd50

Please sign in to comment.