Skip to content

Update GitHub Actions workflows #66

Update GitHub Actions workflows

Update GitHub Actions workflows #66

Workflow file for this run

name: Core
on:
push:
branches:
- main
paths:
- "core/**"
pull_request:
paths:
- "core/**"
defaults:
run:
working-directory: ./core
jobs:
core-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node in root
uses: actions/setup-node@v4
with:
node-version-file: "./.nvmrc"
cache: "yarn"
cache-dependency-path: "./yarn.lock"
- name: Install Dependencies in root
run: cd .. && yarn install --prefer-offline --frozen-lockfile
- name: Set up Node in core package
uses: actions/setup-node@v4
with:
node-version-file: "core/.nvmrc"
cache: "yarn"
cache-dependency-path: "core/yarn.lock"
- name: Install Dependencies in core package
run: yarn install --prefer-offline --frozen-lockfile
- name: Make the script file executable
run: cd .. && chmod +x lint.sh
- name: Format
run: cd .. && yarn format -w core
core-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "core/.nvmrc"
cache: "yarn"
cache-dependency-path: "core/yarn.lock"
- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
- name: Build
run: yarn build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: core-build
path: |
core/build/
core/typechain/
if-no-files-found: error
core-test:
needs: [core-build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "core/.nvmrc"
cache: "yarn"
cache-dependency-path: "core/yarn.lock"
- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: core-build
path: core/
- name: Test
run: yarn test --no-compile
core-deploy-dry-run:
needs: [core-build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "core/.nvmrc"
cache: "yarn"
cache-dependency-path: "core/yarn.lock"
- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: core-build
path: core/
- name: Deploy
run: yarn deploy --no-compile