Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
zapaz committed May 17, 2024
1 parent 78860df commit 45303f9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 32 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/deploy-wp-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,16 @@ jobs:

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Print forge location
run: which forge

- name: Print $HOME
run: echo $HOME

- name: Install node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4
with:
version: 8.15.8
version: 8.15.7

- name: Build wp plugin
run: pnpm deploy:plugin
Expand Down
24 changes: 8 additions & 16 deletions .github/workflows/test-forge.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
name: TEST forge

name: TEST Foundry Installation
on:
push:
branches:
- deployWithGitHubAction
- none


jobs:
check:
name: Test smartcontracts with forge
runs-on: ubuntu-22.04

name: Foundry project
runs-on: ubuntu-latest
steps:
- name: CHECKOUT kredeum nfts

uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
submodules: recursive

- name: INSTALL foundry
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: BUILD forge
working-directory: contracts
run: forge build
- run: forge --version

- name: TEST forge
working-directory: contracts
run: forge test -vvv
10 changes: 5 additions & 5 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
"main": "index.js",
"scripts": {
"clean": "forge clean && rm -rf cache-forge out node_modules lib types artifacts broadcast .turbo && git restore lib",
"postinstall": "pnpm install:foundry && pnpm forge:update",
"install:foundry": "command -v forge >/dev/null 2>&1 || pnpm foundry:install",
"postinstall": "pnpm forge:install && pnpm forge:update",
"build": "pnpm build:forge && pnpm build:typechain",
"build:forge": "$HOME/.foundry/bin/forge build",
"build:forge": "forge build",
"build:typechain": "typechain --target ethers-v5 --out-dir types out/**/*.json",
"check": "pnpm check:solidity",
"check:solidity": "solhint src/**/*.sol",
Expand All @@ -38,8 +37,9 @@
"deploy:all": "forge script scripts/DeployAllCurrent.s.sol",
"validate:only": "pnpm deploy:all --sender $SENDER",
"format": "pnpm format:solidity",
"format:solidity": "$HOME/.foundry/bin/forge fmt",
"foundry:install": "curl -L https://foundry.paradigm.xyz | bash && $HOME/.foundry/bin/foundryup",
"format:solidity": "forge fmt",
"foundryup:install": "command -v foundryup >/dev/null 2>&1 || curl -L https://foundry.paradigm.xyz | bash",
"forge:install": "command -v forge >/dev/null 2>&1 || (pnpm foundryup:install && foundryup)",
"forge:update": "git submodule update --recursive",
"tests": "pnpm tests:forge",
"tests:forge": "forge test"
Expand Down

0 comments on commit 45303f9

Please sign in to comment.