Skip to content

Update publish.yml #265

Update publish.yml

Update publish.yml #265

Workflow file for this run

name: Test
on: [push, pull_request]
env:
NODE_VERSION: 20
PYTHON_VERSION: 3.11
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 21.x]
steps:
- uses: actions/checkout@v4
- name: Install NODE JS
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install project
run: yarn install
# TODO: add linting
- name: Test deployment
run: ./scripts/test_deploy.sh
- name: Test upgrade
env:
NODE_VERSION: ${{ matrix.node-version }}
run: ./scripts/test_upgrade.sh
# - name: Test ABI generation
# run: npx hardhat run scripts/generateAbi.ts
- name: Run tests
run: yarn exec hardhat coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
predeployed-test:
runs-on: ubuntu-latest
env:
ETH_PRIVATE_KEY: ${{ secrets.ETH_PRIVATE_KEY }}
defaults:
run:
working-directory: predeployed
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
cache-dependency-path: predeployed/setup.py
- name: Compile and generate artifacts
run: |
yarn compile
python scripts/generate_artifacts.py
- name: Install geth
run: |
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt install ethereum
- name: Install python dependencies
run: |
pip install wheel
pip install -e .[dev]
- name: Run tests
run: |
pytest .