Skip to content

first pass at new editions contract #354

first pass at new editions contract

first pass at new editions contract #354

Workflow file for this run

name: Test!
on:
pull_request: {}
workflow_dispatch: {}
push:
branches:
- main
jobs:
build-truffle:
continue-on-error: true
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
folder: ["edition", "lazywhitelist", "redeem", "manifold"]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Set Node to v16
uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install truffle
run: |
yarn global add truffle
yarn global add ganache-cli
# For each package, run the following steps
- name: Install dependencies
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
yarn install
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: packages/${{ matrix.folder }}
- name: Truffle compile
run: truffle compile --contracts_directory contracts
working-directory: packages/${{ matrix.folder }}
- name: Remove forge test sol files
run: rm -rf test/**/*.t.sol
working-directory: packages/${{ matrix.folder }}
- name: Start ganache and run tests
working-directory: packages/${{ matrix.folder }}
run: |
ganache-cli -l 20000000 &
truffle migrate &&
truffle compile @manifoldxyz/creator-core-solidity/contracts/ERC1155Creator.sol &&
truffle compile @manifoldxyz/creator-core-solidity/contracts/ERC721Creator.sol &&
truffle test
build-forge:
continue-on-error: true
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
folder: ["dynamic", "enumerable", "manifold"]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Set Node to v16
uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
# For each package, run the following steps
- name: Install dependencies
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
yarn install
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: packages/${{ matrix.folder }}
- name: Forge build
run: forge build
working-directory: packages/${{ matrix.folder }}
- name: Forge test
run: forge test
working-directory: packages/${{ matrix.folder }}
- name: Forge coverage
run: forge coverage --report lcov
working-directory: packages/${{ matrix.folder }}
- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1
- name: Report code coverage
uses: zgosalvez/github-actions-report-lcov@v3
with:
coverage-files: packages/${{ matrix.folder }}/lcov.info
artifact-name: code-coverage-report
github-token: ${{ secrets.GITHUB_TOKEN }}
working-directory: packages/${{ matrix.folder }}
update-comment: true