Skip to content

Commit

Permalink
Add basic CI (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ToucheSir authored Sep 4, 2020
1 parent 292bfe5 commit c10ec3c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build and Test on CI

on:
push:
tags: '*'
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install frontend deps
working-directory: frontend
run: npm ci
- name: Build
run: make
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: annotator
# A file, directory or wildcard pattern that describes what to upload
path: build/*
# The desired behavior if no files are found using the provided path.
if-no-files-found: error # optional, default is warn
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
all: backend frontend
tar -cvf annotator-`git rev-parse --short HEAD`.tar.gz build
# tar -cvf annotator-`git rev-parse --short HEAD`.tar.gz build

.PHONY: all backend frontend

Expand All @@ -9,10 +9,10 @@ init:
backend: init
cp backend/*.py build
cp -r backend/app build
rm -r build/app/__pycache__
rm -r build/app/__pycache__ || true

frontend: init
cd frontend && npm run build && cp -r build ../build/static

clean:
rm -r build annotator*.tar.gz || true
rm -r build annotator*.tar.gz || true

0 comments on commit c10ec3c

Please sign in to comment.