Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 34 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,35 @@ on:
- main

jobs:
test-and-lint:
test-frontend:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci --prefer-offline --no-audit

- name: Run lint
run: npm run lint

- name: Build application
run: npm run build

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run end-to-end tests
run: npm run test:e2e

test-contracts:
runs-on: ubuntu-latest

steps:
Expand All @@ -18,7 +46,8 @@ jobs:

- name: Set up Scarb
run: |
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.11.4
echo "$HOME/.local/bin" >> $GITHUB_PATH
scarb --version

- name: Install dependencies
Expand All @@ -30,10 +59,10 @@ jobs:
working-directory: ./contract
run: scarb build

- name: Run tests

- name: Run contract tests
working-directory: ./contract
run: scarb test

- name: Check linting
- name: Check contract linting
working-directory: ./contract
run: scarb fmt --check
7 changes: 2 additions & 5 deletions contract/tests/test_contract.cairo
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
use contract::{
IHelloStarknetDispatcher, IHelloStarknetDispatcherTrait, IHelloStarknetSafeDispatcher,
IHelloStarknetSafeDispatcherTrait,
};
use contract::{
IProfileSystemDispatcher, IProfileSystemDispatcherTrait
IHelloStarknetSafeDispatcherTrait, IProfileSystemDispatcher, IProfileSystemDispatcherTrait,
};
use core::array::ArrayTrait;
use snforge_std::{ContractClassTrait, DeclareResultTrait, declare};
use starknet::ContractAddress;
use core::array::ArrayTrait;

fn deploy_contract(name: ByteArray) -> ContractAddress {
let contract = declare(name).unwrap().contract_class();
Expand Down
Loading
Loading