Skip to content

Commit

Permalink
fix(igr-ts): add github workflows folder (#1192)
Browse files Browse the repository at this point in the history
  • Loading branch information
onlyexeption authored Jan 17, 2024
1 parent cac565f commit 2369c55
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ $(yamlDefaultBranch) ]
pull_request:
branches: [ $(yamlDefaultBranch) ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
# cache: 'npm' # enable after committing lock file from first install
- run: npm i # replace with 'npm ci' after committing lock file from first install
# - run: npm run lint
- run: npm run build
- run: npm run test

3 changes: 2 additions & 1 deletion packages/cli/templates/react/igr-ts/projects/_base/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export class BaseIgrTsProject implements ProjectTemplate {
"description": this.description,
"dot": ".",
"path": name,
"projectTemplate": this.id
"projectTemplate": this.id,
"yamlDefaultBranch": this.id === "base" ? "<%=yaml-default-branch%>" : "main"
};
}
}

0 comments on commit 2369c55

Please sign in to comment.