This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/.github/workflows/nodejs.yml
2020-12-28 11:46:44 +01:00

62 lines
1.4 KiB
YAML

# 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: [master]
pull_request:
branches: [master]
jobs:
ci_website:
runs-on: 'ubuntu-latest'
defaults:
run:
working-directory: 'website'
strategy:
matrix:
node-version: [14.x]
steps:
- uses: 'actions/checkout@v2'
- name: Use Node.js ${{ matrix.node-version }}
uses: 'actions/setup-node@v2.1.2'
with:
node-version: ${{ matrix.node-version }}
- name: 'Cache dependencies'
uses: 'actions/cache@v2'
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: 'npm install'
- run: 'npm run lint'
- run: 'npm run build'
ci_api:
runs-on: 'ubuntu-latest'
defaults:
run:
working-directory: 'api'
strategy:
matrix:
node-version: [14.x]
steps:
- uses: 'actions/checkout@v2'
- name: Use Node.js ${{ matrix.node-version }}
uses: 'actions/setup-node@v2.1.2'
with:
node-version: ${{ matrix.node-version }}
- name: 'Cache dependencies'
uses: 'actions/cache@v2'
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: 'npm install'
- run: 'npm run lint'