Skip to content

Commit

Permalink
chore: yarn install+build+lint+test action using for core
Browse files Browse the repository at this point in the history
  • Loading branch information
thlorenz committed Nov 30, 2021
1 parent 4a0f111 commit 1a2fd79
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 28 deletions.
37 changes: 37 additions & 0 deletions .github/actions/yarn-install-and-verify/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Yarn Install Build Test and Lint

inputs:
cache_id:
description: ID to use in order to cache yarn install
required: true
working_dir:
description: Directory in which to perform the yarn tasks
required: true

runs:
using: composite
steps:
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ inputs.cache_id }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install modules
run: yarn install
working-directory: ${{ inputs.working_dir }}
shell: bash

- name: Build TypeScript
run: yarn build
working-directory: ${{ inputs.working_dir }}
shell: bash

- name: Test TypeScript
run: yarn test
working-directory: ${{ inputs.working_dir }}
shell: bash

- name: Lint TypeScript
run: yarn lint
working-directory: ${{ inputs.working_dir }}
shell: bash
18 changes: 18 additions & 0 deletions .github/workflows/sdk-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: SDK Core

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build-lint-and-test-core:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: ./.github/actions/yarn-install-and-verify
with:
cache_id: sdk-core
working_dir: ./core/js
28 changes: 0 additions & 28 deletions .github/workflows/yarn-build-and-lint.yml

This file was deleted.

0 comments on commit 1a2fd79

Please sign in to comment.