Skip to content

Commit

Permalink
ci: create GH workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
getlarge committed Feb 16, 2022
1 parent 7c1e8be commit 2ffbe99
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI

on:
push:
branches:
- main
paths-ignore:
- README.md
- API.md
- docs/*.rst
pull_request:
branches:
- main
types:
- ready_for_review
- opened
- reopened
- synchronize
paths-ignore:
- README.md
- API.md
- docs/*.rst

jobs:
test:
runs-on: ubuntu-latest
if: github.event_name == 'release' || github.event_name == 'push' || !github.event.pull_request.draft
timeout-minutes: 10

steps:
- name: Checkout the commit
uses: actions/checkout@v2

- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 14

- name: Cache dependencies
id: cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
env:
HUSKY_SKIP_INSTALL: 'true'
run: npm install

- name: Lint
run: npm run lint

- name: Build
run: npm run build

- name: Build docker
run: |
echo Building and starting up docker containers
docker-compose -f ./docker-compose.yml up
- name: Test
run: npm run test

0 comments on commit 2ffbe99

Please sign in to comment.