Skip to content

github workflow for pr's #1

github workflow for pr's

github workflow for pr's #1

Workflow file for this run

name: Run Tests on Pull Request
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
# Install dependencies
- name: Install dependencies
run: npm install
# Compile the smart contracts
- name: Compile contracts
run: npx hardhat compile
# Run the tests
- name: Run tests
run: npx hardhat test
# Cache dependencies (optional)
- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-