Skip to content

Commit

Permalink
テスト実行とガスレポートをGitHub Actionsに
Browse files Browse the repository at this point in the history
  • Loading branch information
takerunakao committed Sep 28, 2024
1 parent fe87ea1 commit fc57903
Show file tree
Hide file tree
Showing 5 changed files with 12,922 additions and 1,079 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/test-contract.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test Contracts

on:
# mainブランチにプッシュされたとき、またはプルリクエストが作成されたときに実行
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

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

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

- name: Install dependencies
run: npm install
working-directory: ./toban/pkgs/contract

- name: Run Hardhat tests
run: npx hardhat test
working-directory: ./toban/pkgs/contract

# ガスレポートをアーティファクトとして保存
- name: Upload Gas Report
uses: actions/upload-artifact@v3
with:
name: gas-report
path: ./toban/pkgs/contract/gas-report.txt
Loading

0 comments on commit fc57903

Please sign in to comment.