Skip to content

Commit

Permalink
wip: setting up ci
Browse files Browse the repository at this point in the history
  • Loading branch information
xenide committed Jun 6, 2024
1 parent 97a47ab commit 641945c
Show file tree
Hide file tree
Showing 7 changed files with 8,193 additions and 36 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: ci

on: push

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- run: npm ci
- run: npm run lint:check

test-unit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- run: npm run test:unit

test-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- run: npm run test:integration

check-gas:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- run: forge snapshot --check
env:
FOUNDRY_PROFILE: default

coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- run: ./script/coverage_patch_deployer.sh && forge coverage --report lcov
env:
FOUNDRY_PROFILE: coverage
- run: sudo apt install -y lcov
- run: lcov -r lcov.info "src/libraries/*" -o lcov.info
- run: lcov -r lcov.info "test/*" -o lcov.info
- run: |
! lcov --summary lcov.info | grep -q 0.0%
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: ./lcov.info
34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.

14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Compiler files
cache/
out/
/cache
/out

# Ignores development broadcast logs
!/broadcast
Expand All @@ -12,3 +12,13 @@ docs/

# Dotenv file
.env

# slither
/slither-report.md

# typechain
/typings

# node
/node_modules

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.14.2
Loading

0 comments on commit 641945c

Please sign in to comment.