Skip to content

Commit

Permalink
Add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianBorst committed Jun 12, 2024
1 parent aca227f commit 52f46ab
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Solidity contract build and test

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]

jobs:
core-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Build and test Solidity contracts
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: ls -al ./contracts
- run: cd contracts && npm install && npm ci
- run: cd contracts && npx hardhat compile
- run: cd contracts && npx hardhat test
4 changes: 2 additions & 2 deletions test/liquidERC20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ describe('TestLiquidERC20', () => {

it("BigNumber Agent Staking", async () => {
const start = Date.now();
const five_minutes = 5 * 60 * 1000;
const three_minutes = 3 * 60 * 1000;
const stakerActionsPerWithdrawal = 5;
const ownerActionsPerWithdrawal = 2;
let deployer = signers[0];
Expand Down Expand Up @@ -363,7 +363,7 @@ describe('TestLiquidERC20', () => {
}

let w = -1;
while (Date.now() - start < five_minutes) {
while (Date.now() - start < three_minutes) {
w += 1;
console.log("Withdrawal " + w)
for (let s = 0; s < stakerActionsPerWithdrawal; s++) {
Expand Down

0 comments on commit 52f46ab

Please sign in to comment.