rework deploy for single chain, add shape deployment #238
Workflow file for this run
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: contracts | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
NODE_ENV: ci | |
defaults: | |
run: | |
working-directory: ./packages/contracts | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [18.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Cache pnpm modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: pnpm | |
- name: Install Foundry | |
uses: onbjerg/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- run: pnpm install | |
- run: pnpm build | |
- name: Outdated files detected, run `pnpm build` and commit them | |
run: | | |
if [[ -n "$(git status --porcelain)" ]]; then | |
git status | |
git --no-pager diff | |
exit 1 | |
fi | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [18.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Cache pnpm modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "pnpm" | |
- name: Install Foundry | |
uses: onbjerg/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- run: pnpm install | |
- run: pnpm test |