feat: add build checks for app/client and landing page #468
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: Landver Contracts | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
# build: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Cache Scarb dependencies | |
# uses: actions/cache@v3 | |
# with: | |
# path: ~/.scarb | |
# key: ${{ runner.os }}-scarb-${{ hashFiles('**/Cargo.toml') }} | |
# restore-keys: | | |
# ${{ runner.os }}-scarb- | |
# - name: Install Scarb | |
# run: | | |
# curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh | |
# - name: Run Scarb commands | |
# working-directory: ./land_registry | |
# run: | | |
# scarb build | |
test: | |
runs-on: ubuntu-latest | |
name: tests | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Scarb | |
uses: software-mansion/setup-scarb@v1 | |
with: | |
scarb-version: "2.8.2" | |
- name: Set up SNForge | |
uses: foundry-rs/setup-snfoundry@v3 | |
with: | |
starknet-foundry-version: "0.31.0" | |
- name: Run tests | |
run: snforge test | |
working-directory: land_registry | |
build-client: | |
runs-on: ubuntu-latest | |
name: Build app/client and landing page | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 # Use the version required by your project | |
- name: Cache pnpm modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pnpm-store | |
key: pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
pnpm-${{ runner.os }}- | |
- name: Install dependencies for client | |
run: pnpm install | |
working-directory: app/client | |
- name: Build app/client | |
run: npm run build | |
working-directory: app/client | |
- name: Install dependencies for landing page | |
run: npm install | |
working-directory: landing_page | |
- name: Build landing page | |
run: npm run build | |
working-directory: landing_page |