Skip to content

Commit

Permalink
feat: add github action for contract tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hstove committed May 6, 2024
1 parent 6e32e80 commit 767c5d9
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 28 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/contract-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Contract tests
on: [push]

jobs:
contract_tests:
name: Contract tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 9.0.6
- name: Set Node Version
uses: actions/setup-node@v3
with:
node-version: 18.19.0
cache: "pnpm"
- name: Install dependencies
run: pnpm install
working-directory: ./contracts
- name: Type checks
run: pnpm typecheck
working-directory: ./contracts
- name: Tests
run: pnpm test
working-directory: ./contracts
3 changes: 2 additions & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"test": "vitest run",
"test:report": "vitest run -- --coverage --costs",
"test:watch": "chokidar \"tests/**/*.ts\" \"contracts/**/*.clar\" -c \"npm run test:report\""
"test:watch": "chokidar \"tests/**/*.ts\" \"contracts/**/*.clar\" -c \"npm run test:report\"",
"typecheck": "tsc --noEmit"
},
"author": "",
"license": "ISC",
Expand Down
21 changes: 0 additions & 21 deletions contracts/tests/sbtc-bootstrap-signers.test.ts

This file was deleted.

7 changes: 1 addition & 6 deletions contracts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
// "types": ["@clarigen/test"]
},
"include": [
"@clarigen/test",
"node_modules/@hirosystems/clarinet-sdk/vitest-helpers/src",
"tests"
]
"include": ["@clarigen/test", "tests"]
}

0 comments on commit 767c5d9

Please sign in to comment.