diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c06d4dd --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: Build +on: + push: + branches: + - '*' + pull_request: + types: [opened, reopened, synchronize] + +env: + FORCE_COLORS: 1 + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-node@v1 + with: + node-version: '18' + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + + - uses: actions/checkout@v1 + - uses: actions/cache@v2 + with: + path: node_modules + key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} + - run: yarn install + - run: yarn run ci + + diff --git a/.gitignore b/.gitignore index 697c50f..e4fca6c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ node_modules # Hardhat Ignition default folder for deployments against a local node ignition/deployments/chain-31337 /out/ +/.idea/ +/cache_forge/ diff --git a/package.json b/package.json index 4f7d391..ecb74de 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,11 @@ "repository": "git@github.com:eth-infinitism/rip7560_contracts.git", "author": "Alex Forshtat ", "license": "MIT", + "scripts": { + "test-hardhat": "hardhat test", + "test-forge": "forge test", + "ci": "yarn test-hardhat && yarn test-forge" + }, "devDependencies": { "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", "@nomicfoundation/hardhat-ethers": "^3.0.0",