Skip to content

Commit

Permalink
Merge pull request #2 from logos-innovation-lab/ci/tests-in-GH-actions
Browse files Browse the repository at this point in the history
ci: run hardhat tests in github actions
  • Loading branch information
agazso authored Dec 11, 2023
2 parents d71d1d8 + 650ae38 commit 0da559d
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 13 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Test

on:
push:
branches:
- "main"
pull_request:
branches:
- "**"

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
with:
version: 7

- name: Install dependenciess
run: pnpm install --frozen-lockfile

- name: Download snark-artifacts
run: pnpm run download:snark-artifacts

- name: Start Hardhat node, Run Tests, and Shutdown Hardhat node
run: |
npx hardhat node &
HARDHAT_PID=$!
sleep 5 # Wait for Hardhat node to be fully up and running
pnpm test
kill $HARDHAT_PID
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true
auto-install-peers=false
21 changes: 9 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/CypherCity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe("CypherCity contract", () => {
describe('members', () => {
it('', async () => {
const address = '0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9'
const semaphore = new SemaphoreEthers("http://localhost:8545", {
const semaphore = new SemaphoreEthers("http://127.0.0.1:8545", {
address,
})
const group = await semaphore.getGroup(groupId.toString())
Expand Down

0 comments on commit 0da559d

Please sign in to comment.