feat: capped minter v2 minter role #39
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: L2 contracts ci | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
FOUNDRY_PROFILE: ci | |
jobs: | |
build: | |
defaults: | |
run: | |
working-directory: ./l2-contracts | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 1 | |
- name: Install Foundry | |
uses: dutterbutter/foundry-zksync-toolchain@v1 | |
- name: Install dependencies | |
run: | | |
forge install --no-commit | |
npm install | |
- name: Build contracts | |
run: forge build --zksync | |
test: | |
defaults: | |
run: | |
working-directory: ./l2-contracts | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 1 | |
- name: Install Foundry | |
uses: dutterbutter/foundry-zksync-toolchain@v1 | |
- name: Install dependencies | |
run: forge install --no-commit | |
- name: Run forge tests | |
run: | | |
# Run forge tests with lower fuzz runs for speed, only in our test directory | |
forge test --match-path "test/*.t.sol" --no-match-path "test/*.integration.t.sol" --zksync -vv | |
lint: | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./l2-contracts | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 1 | |
- name: Install Foundry | |
uses: dutterbutter/foundry-zksync-toolchain@v1 | |
- name: Install dependencies | |
run: | | |
git config --global url."https://github.com/".insteadOf "[email protected]:" | |
forge install --no-commit --shallow | |
npm install | |
- name: Install scopelint | |
uses: engineerd/[email protected] | |
with: | |
name: scopelint | |
repo: ScopeLift/scopelint | |
fromGitHubReleases: true | |
version: latest | |
pathInArchive: scopelint-x86_64-linux/scopelint | |
urlTemplate: https://github.com/ScopeLift/scopelint/releases/download/{{version}}/scopelint-x86_64-linux.tar.xz | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check formatting | |
run: | | |
scopelint --version | |
scopelint check |