Skip to content

Resolving conflicting names. #9

Resolving conflicting names.

Resolving conflicting names. #9

Workflow file for this run

name: Truffle CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
cache: "npm" # This caches node_modules automatically based on package-lock.json
- name: Cache global npm packages
uses: actions/cache@v2
with:
path: ~/.npm # Cache path for globally installed npm packages
key: ${{ runner.os }}-npm-global-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-npm-global-
- name: Create .env file from Secrets
run: |
echo "PRIVATE_KEY=${{ secrets.PRIVATE_KEY }}" >> .env
echo "DEV_RPC_URL=${{ secrets.DEV_RPC_URL }}" >> .env
echo "PKSwapFactory=${{ secrets.PKSWAPFACTORY }}" >> .env
echo "FeeCollectorAddress=${{ secrets.FEECOLLECTORADDRESS }}" >> .env
echo "WrappedToken=${{ secrets.WRAPPEDTOKEN }}" >> .env
echo "LOCAL_TESTNET_ACCOUNTS=${{ secrets.LOCAL_TESTNET_ACCOUNTS }}" >> .env
cat .env
- name: Install truffle globally if not cached
run: npm install -g truffle
- name: Install npm and dependencies if not cached
run: npm install
- name: Compile contracts
run: truffle compile
- name: Run tests
run: truffle test --no-parallel