Skip to content

Commit

Permalink
Separate build and validate CI jobs (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
samtstern committed Aug 2, 2021
1 parent e732950 commit 5f55050
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 6 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Build

on:
push:
paths:
- 'app/**'
- 'functions/**'
- 'shared/**'
pull_request:
paths:
- 'app/**'
- 'functions/**'
- 'shared/**'

env:
CI: true

jobs:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 12.x
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache npm
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}

- name: Build Shared
run: (cd shared && npm install)

- name: Build App
run: (cd app && npm install && npm run build:production)

- name: Build Functions
run: (cd functions && npm install && npm run build)
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,5 @@ jobs:
- name: Build Shared
run: (cd shared && npm install)

- name: Build App
run: (cd app && npm install && npm run build:production)

- name: Build Functions
run: (cd functions && npm install && npm run build)

- name: Validate Schemas
run: (cd shared && npm run validate)

0 comments on commit 5f55050

Please sign in to comment.