generated from coral-xyz/xnft-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add CI to verify all entries can be built
- Loading branch information
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Prepare local env | ||
description: Prepare local environment by setup node, and cache dependencies | ||
outputs: | ||
cache-hit: | ||
description: Whether the dependencies were cached | ||
value: ${{ steps.npm-cache.outputs.cache-hit }} | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Read .nvmrc | ||
shell: bash | ||
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | ||
id: nvm | ||
- name: Use Node.js (.nvmrc) | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "${{ steps.nvm.outputs.NVMRC }}" | ||
cache: npm | ||
# - name: Get npm cache directory | ||
# shell: bash | ||
# id: npm-cache-dir | ||
# run: | | ||
# echo "::set-output name=dir::$(npm config get cache)" | ||
# - uses: actions/cache@v3 | ||
# id: npm-cache | ||
# with: | ||
# path: | | ||
# **/node_modules | ||
# ${{ steps.npm-cache-dir.outputs.dir }} | ||
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-node- |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build xNFT, web, and mobile | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
prepare-dependencies: | ||
name: Prepare local deps | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- id: prepare-env | ||
uses: ./.github/actions/prepare-local-env | ||
- name: Use cache or install dependencies | ||
# if: steps.prepare-env.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
build-xnft: | ||
name: Build xNFT | ||
needs: prepare-dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- uses: ./.github/actions/prepare-local-env | ||
- name: Build xNFT | ||
run: npm run build:xnft | ||
|
||
build-web: | ||
name: Build web | ||
needs: prepare-dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- uses: ./.github/actions/prepare-local-env | ||
- name: Build web | ||
run: npm run build:web | ||
|
||
# build-android: | ||
# name: Build Android | ||
# needs: prepare-dependencies | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v2 | ||
# - uses: ./.github/actions/prepare-local-env | ||
# - name: 🏗 Setup EAS | ||
# uses: expo/expo-github-action@v8 | ||
# with: | ||
# eas-version: latest | ||
# - name: Build Android | ||
# run: npm run build:mobile:prod |