Skip to content

Commit

Permalink
Fix ci (#57)
Browse files Browse the repository at this point in the history
* fix CI

* add comments + fmt

* add too-versions
  • Loading branch information
manlikeHB authored Jan 27, 2025
1 parent 5482d42 commit e430aa4
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 86 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/cairo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Dewordle Contracts

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: scarb fmt --check
working-directory: onchain
- run: scarb build
working-directory: onchain

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: snforge test
working-directory: onchain
80 changes: 0 additions & 80 deletions .github/workflows/smart-contract-ci.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
starknet-foundry 0.30.0
scarb 2.8.4
4 changes: 2 additions & 2 deletions onchain/src/interfaces.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ pub trait IDeWordle<TContractState> {
#[derive(Drop, Serde, starknet::Store)]
pub struct PlayerStat {
pub player: ContractAddress,
pub score: u64,
pub score: u64, //TODO: Impl scoring logic
pub games_played: u64,
pub games_won: u64,
pub current_streak: u64,
pub max_streak: u64
pub max_streak: u64 //TODO: Impl streaking logic
}

#[derive(Drop, Serde, starknet::Store)]
Expand Down
5 changes: 1 addition & 4 deletions onchain/tests/test_dewordle.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,5 @@ fn test_set_daily_word() {
dewordle.set_daily_word(daily_word.clone());

// Verify that the daily word was set correctly
assert(
dewordle.get_daily_word() == daily_word,
'Daily word not stored correctly'
);
assert(dewordle.get_daily_word() == daily_word, 'Daily word not stored correctly');
}

0 comments on commit e430aa4

Please sign in to comment.