Skip to content

Commit

Permalink
github actions: add build + lint check workflow for coral_web (#81)
Browse files Browse the repository at this point in the history
* add coral_web workflow

* add path filter

* setup node, pnpm and install deps before running checks

* update node version file path

* update actions paths/directories
  • Loading branch information
misspia-cohere committed May 8, 2024
1 parent 87ed86e commit 73526a5
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/actions/js-install/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: js-install
description: Set up Node.js and pnpm, install dependencies

runs:
using: composite
steps:
- uses: pnpm/action-setup@v2.1.0
with:
version: "9.0.6"

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: "src/interfaces/coral_web/.nvmrc"
cache: "pnpm"
cache-dependency-path: "src/interfaces/coral_web/pnpm-lock.yaml"

- name: Install dependencies with pnpm
shell: bash
working-directory: src/interfaces/coral_web
run: pnpm install --frozen-lockfile
27 changes: 27 additions & 0 deletions .github/workflows/interface_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Interface Tests

on:
push:
branches: [main]
paths:
- src/interfaces/coral_web/**
pull_request: {}

jobs:
interface_tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/interfaces/coral_web

steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Node.js and install dependencies
uses: ./.github/actions/js-install
- name: Check coral_web is formatted
run: pnpm format
- name: Check coral_web can build
run: pnpm build

0 comments on commit 73526a5

Please sign in to comment.