Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maxencerb committed May 2, 2024
1 parent a0e7606 commit f017c23
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/actions/install-dependencies/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Install dependencies"
description: "Prepare repository and all dependencies"

runs:
using: "composite"
steps:
- name: Set up Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.1.6

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 21

- name: Set up Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install dependencies
shell: bash
run: bun install
33 changes: 33 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Tests"

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

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
tests:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
uses: ./.github/actions/install-dependencies

- name: Run tests
run: bun run test:ci
Binary file modified bun.lockb
Binary file not shown.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
"format": "biome format . --write",
"lint": "biome check .",
"lint:fix": "bun run lint --apply",
"test": "vitest -c ./test/vitest.config.ts dev"
"test": "vitest -c ./test/vitest.config.ts dev",
"test:ci": "CI=true vitest -c ./test/vitest.config.ts --coverage --retry=3 --bail=1 --pool=forks"
},
"devDependencies": {
"@biomejs/biome": "1.7.2",
"@types/bun": "latest",
"@viem/anvil": "^0.0.10",
"@vitest/coverage-v8": "^1.5.3",
"globby": "^14.0.0",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.11.1",
Expand Down
Empty file removed src/actions/limit-order.test.ts
Empty file.

0 comments on commit f017c23

Please sign in to comment.