Add InstanceRangeMint (#98) #436
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: Set Node to v18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- 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@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: Set Node to v8 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- 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@v4 | |
with: | |
coverage-files: packages/${{ matrix.folder }}/lcov.info | |
artifact-name: code-coverage-report-${{ matrix.folder }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: packages/${{ matrix.folder }} | |
update-comment: true |