Skip to content

Commit

Permalink
ci-updated
Browse files Browse the repository at this point in the history
  • Loading branch information
hironate committed Feb 18, 2024
1 parent f205946 commit 145fdbc
Showing 1 changed file with 7 additions and 28 deletions.
35 changes: 7 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,11 @@ on:
pull_request:
branches: [master]

defaults:
run:
shell: bash
working-directory: .

jobs:
linting:
name: Linting Checks
common:
runs-on: ubuntu-latest
steps:
- &checkout
name: Checkout Repository
- name: Checkout Repository
uses: actions/checkout@v3

- name: Use Node.js 16.15.1
Expand All @@ -34,32 +27,18 @@ jobs:
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci

linting:
name: Linting Checks
steps:
- <<: *common
- name: Run Linting
run: npm run lint

tests:
name: Smart Contract Tests
runs-on: ubuntu-latest
env:
ACCOUNT_PRIVATE_KEY: ${{ secrets.ACCOUNT_PRIVATE_KEY }}
steps:
- *checkout

- name: Use Node.js 16.15.1
uses: actions/setup-node@v1
with:
node-version: 16.15.1

- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: 'node_modules'
key: node_modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci

- <<: *common
- name: Run Tests
run: npx hardhat test

0 comments on commit 145fdbc

Please sign in to comment.