Skip to content

Commit

Permalink
Merge branch 'main' into test-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Picodes authored Oct 16, 2023
2 parents 6f459db + 3a963f7 commit 94f1e8b
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# .github/workflows/ci.yml

name: CI

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

jobs:
build-and-test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x] # Use the version of Node.js that matches your project's requirements

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Compile TypeScript
run: yarn tsc --noEmit

- name: Run tests
run: yarn test
1 change: 1 addition & 0 deletions tests/holderDiffs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ describe('Errors in the differences between two trees', async function () {
merkleRootsProvider: new ManualMerkleRootsProvider(),
};


const report = await checkHolderValidity(testContext, testReport);

expect(report.err).to.equal(false);
Expand Down
4 changes: 2 additions & 2 deletions tests/overclaims.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect } from 'chai';
import { describe, it } from 'node:test';

import { DisputeContext } from '../src/bot/context';
import { checkHolderValidity, checkOverclaimedRewards } from '../src/bot/runner';
import { checkOverclaimedRewards } from '../src/bot/runner';
import ConsoleLogger from '../src/helpers/logger/ConsoleLogger';
import { BotError, MerklReport, Resolver, StepResult } from '../src/types/bot';
import ManualChainProvider from './helpers/ManualChainProvider';
Expand Down Expand Up @@ -31,7 +31,7 @@ describe('Overclaim detections', async function () {

const holdersReport = await checkHolderValidity(testContext, testReport);

Check failure on line 32 in tests/overclaims.test.ts

View workflow job for this annotation

GitHub Actions / build-and-test (14.x)

Cannot find name 'checkHolderValidity'.
const report = await checkOverclaimedRewards(testContext, holdersReport.res.report);

expect(report.err).to.equal(true);
report.err && expect(report.res.code).to.equal(BotError.AlreadyClaimed);
});
Expand Down

0 comments on commit 94f1e8b

Please sign in to comment.