Skip to content

Commit

Permalink
adds test action (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackburrus authored Aug 15, 2023
1 parent c3d246a commit 5d510d0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# https://turbo.build/repo/docs/ci/github-actions

name: Test

on: [pull_request]

jobs:
lint:
name: Test
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
cache: "yarn"

- name: Install yarn
run: npm install -g yarn

- name: Install dependencies
run: yarn

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

- name: Run tests
run: yarn test:run
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ test("returns the users open longs", async () => {
expect(
// the amount of base you get back can be slightly different on each test
// run, so we assert the value is close enough +/- some small amount
// TODO: Local testing and Github actions produce different results so a larger delta is needed. Need to investigate why.
+formatUnits(openLongsAfterPartialClosing[0].baseAmountPaid, 18),
).closeTo(0.019167099247425833, 0.000000001);
).closeTo(0.019167099247425833, 0.002);
});

2 comments on commit 5d510d0

@vercel
Copy link

@vercel vercel bot commented on 5d510d0 Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hyperdrive-fixed-borrow – ./apps/fixed-borrow

hyperdrive-fixed-borrow-git-main-delvtech.vercel.app
hyperdrive-fixed-borrow-delvtech.vercel.app
hyperdrive-fixed-borrow.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 5d510d0 Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hyperdrive-monorepo-hyperdrive-trading – ./apps/hyperdrive-trading

hyperdrive-monorepo-hyperdrive-trading.vercel.app
hyperdrive-monorepo-hyperdrive-trading-git-main-delvtech.vercel.app
hyperdrive-monorepo-hyperdrive-trading-delvtech.vercel.app

Please sign in to comment.