This repository has been archived by the owner on Sep 13, 2024. It is now read-only.
build #112
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: '0 7 * * 5' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
mongodb: | |
image: mongo:3.6 | |
ports: | |
- 27017:27017 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/[email protected] | |
with: | |
node-version: '12' | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm install | |
- name: Compile typescript | |
run: npm run tsc | |
- name: Run unit tests | |
run: npm test | |
- name: Ensure no change | |
run: git diff-index --quiet HEAD |