Complete the code to define a GitHub Actions workflow that triggers on push to the main branch.
on: [1]
jobs:
build:
runs-on: ubuntu-latestThe workflow triggers on push events to start the CI/CD process.
Complete the code to install the Solidity compiler in the CI job.
steps:
- name: Install Solidity
run: npm install -g [1]solc is the Solidity compiler package installed globally via npm.
Fix the error in the deployment script command to deploy the smart contract using Hardhat.
npx hardhat [1] --network rinkebyThe correct Hardhat command to run a deployment script is run.
Fill both blanks to create a GitHub Actions step that runs tests and reports coverage.
- name: Run tests and coverage run: npx hardhat [1] && npx [2]
The step runs hardhat test to test contracts and solidity-coverage to report coverage.
Fill all three blanks to define environment variables for deployment in GitHub Actions.
env:
PRIVATE_KEY: ${{ secrets.[1] }}
INFURA_API_KEY: ${{ secrets.[2] }}
ETHERSCAN_API_KEY: ${{ secrets.[3] }}These are common secret names for deployment keys and API keys stored in GitHub Secrets.