Skip to content

Feature/fix GitHub actions #45

Feature/fix GitHub actions

Feature/fix GitHub actions #45

name: NFTC Contracts Continuous Integration
on:
push:
branches: [ "main" ]
# paths-ignore:
# - src/templates/sc/**
pull_request:
branches: [ "main" ]
# paths-ignore:
# - src/templates/sc/**
env:
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source Step
uses: actions/checkout@v3
- name: Use Node.js 21.6.0
uses: actions/setup-node@v3
with:
node-version: '21.6'
cache: 'npm'
- name: Add .npmrc
run: ./.github/workflows/npmrc.sh
- name: Copy local solc cache
run: |
mkdir -p ~/.cache/hardhat-nodejs/Cache/compilers/linux-amd64
cp .solc_cache/list.json ~/.cache/hardhat-nodejs/compilers/linux-amd64/
cp .solc_cache/solc-linux-amd64-v0.8.21+commit.d9974bed ~/.cache/hardhat-nodejs/compilers/linux-amd64/solc-linux-amd64-v0.8.21+commit.d9974bed
- name: Hardhat compiler cache
run: ls ~/.cache/hardhat-nodejs/compilers/linux-amd64/
- name: Make solc executable
run: chmod +x ~/.cache/hardhat-nodejs/compilers/linux-amd64/solc-linux-amd64-v0.8.21+commit.d9974bed
- name: Clean install
run: npm ci
- name: Build Contracts
run: npm run build
- name: Test Contracts
run: npm run test