Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARC-204] set up CI for contracts #2

Merged
merged 4 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## What's new in this PR?

In bullet point format, please describe what's new in this PR.

## Why?

What problem does this solve?
Why is this important?
What's the context?
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: test
name: Continuous Integration

on: workflow_dispatch
on:
push:
branches:
- main
pull_request:
branches:
- main

env:
FOUNDRY_PROFILE: ci
Expand All @@ -10,7 +16,7 @@ jobs:
strategy:
fail-fast: true

name: Foundry project
name: Build and Test Contracts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
14 changes: 14 additions & 0 deletions foundry-template/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Compiler files
cache/
out/

# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/

# Docs
docs/

# Dotenv file
.env
9 changes: 9 additions & 0 deletions foundry-template/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Foundry Template Setup

Copy this folder to start a new Foundry project, then run the following to initialize the submodules:

```bash
$ forge install foundry-rs/forge-std
$ forge install OpenZeppelin/openzeppelin-foundry-upgrades
$ forge install OpenZeppelin/openzeppelin-contracts-upgradeable
```
28 changes: 28 additions & 0 deletions foundry-template/foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[profile.default]
solc = "0.8.25"
evm_version = "cancun"
src = "src"
out = "out"
libs = ["lib"]
ffi = true
ast = true
build_info = true
extra_output = ["storageLayout"]

[fmt]
single_line_statement_blocks = "multi"
multiline_func_header = "params_first"
sort_imports = true
contract_new_lines = true
bracket_spacing = true
int_types = "long"
quote_style = "double"
number_underscore = "thousands"
wrap_comments = true

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options

remappings = [
"@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
]
22 changes: 22 additions & 0 deletions nest/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
[profile.default]
solc = "0.8.25"
evm_version = "cancun"
src = "src"
out = "out"
libs = ["lib"]
ffi = true
ast = true
build_info = true
extra_output = ["storageLayout"]

[fmt]
single_line_statement_blocks = "multi"
multiline_func_header = "params_first"
sort_imports = true
contract_new_lines = true
bracket_spacing = true
int_types = "long"
quote_style = "double"
number_underscore = "thousands"
wrap_comments = true

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options

remappings = [
"@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
]
12 changes: 0 additions & 12 deletions nest/script/Counter.s.sol

This file was deleted.

14 changes: 0 additions & 14 deletions nest/src/Counter.sol

This file was deleted.

24 changes: 0 additions & 24 deletions nest/test/Counter.t.sol

This file was deleted.

Loading