Set up IaC for deployments #2
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: Quality Check | |
on: | |
pull_request | |
jobs: | |
lint-job: | |
name: Lint web app and infra directories | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# We need foundry for contract types | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install dependencies | |
run: | | |
cd web-app/infra | |
npm ci | |
- name: Lint infra | |
run: | | |
cd web-app/infra | |
npm run lint | |
- name: Lint web app | |
run: | | |
cd web-app/src | |
npm run lint | |
typecheck-job: | |
name: Lint web app and infra directories | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# We need foundry for contract types | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install dependencies | |
run: | | |
cd web-app/infra | |
npm ci | |
- name: Typecheck src | |
run: | | |
cd web-app/src | |
npm run typecheck | |
- name: Typecheck src | |
run: | | |
cd web-app/infra | |
npm run typecheck | |
build-job: | |
name: Build web app and infra directories | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# We need foundry for contract types | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install dependencies | |
run: | | |
cd web-app/infra | |
npm ci | |
- name: Build | |
env: | |
WEB_APP_INFRA_ENV: ${{ secrets.WEB_APP_INFRA_ENV }} | |
run: | | |
cd web-app/infra | |
echo $WEB_APP_INFRA_ENV > .env | |
npm run build |