From 2cd3208a665de633ac00d884b36071cdaf36f05d Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 7 Feb 2020 16:35:26 +0100 Subject: [PATCH] feat(scaffolder): Updating templates --- .../template-info.json | 2 +- .../.github/workflows | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 backend/scaffolder/templates/react-ssr-template/{{cookiecutter.component_id}}/.github/workflows diff --git a/backend/scaffolder/templates/android-kotlin-module-template/template-info.json b/backend/scaffolder/templates/android-kotlin-module-template/template-info.json index b7c4e51790..45d4e158b9 100644 --- a/backend/scaffolder/templates/android-kotlin-module-template/template-info.json +++ b/backend/scaffolder/templates/android-kotlin-module-template/template-info.json @@ -1,5 +1,5 @@ { - "id": "android-kotlin-module", + "id": "android-kotlin-module-template", "name": "Kotlin Module", "description": "Kotlin module sample", "ownerId": "ownerId" diff --git a/backend/scaffolder/templates/react-ssr-template/{{cookiecutter.component_id}}/.github/workflows b/backend/scaffolder/templates/react-ssr-template/{{cookiecutter.component_id}}/.github/workflows new file mode 100644 index 0000000000..9087876ce2 --- /dev/null +++ b/backend/scaffolder/templates/react-ssr-template/{{cookiecutter.component_id}}/.github/workflows @@ -0,0 +1,39 @@ +name: Frontend CI + +on: + push: + paths: + - '.' + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x] + + steps: + - name: checkout code + uses: actions/checkout@v1 + - name: get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: use node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: yarn install, build, and test + working-directory: . + run: | + yarn install + yarn build --if-present + yarn test + env: + CI: true