feat: add build checks for app/client and landing page #460
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@main | |
- 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@main | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 # Use the version required by your project | |
- name: Cache Node.js modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
npm-${{ runner.os }}- | |
- name: Install dependencies | |
run: npm install | |
working-directory: app/client | |
- name: Build app/client | |
run: npm run build | |
working-directory: app/client | |
- name: Build landing page | |
run: npm run build-landing-page # Replace with the actual command for building the landing page | |
working-directory: app/client |