Skip to content

Commit

Permalink
move to github actions for CI?
Browse files Browse the repository at this point in the history
  • Loading branch information
JaneJeon committed Oct 26, 2021
1 parent 48e9041 commit aa281e7
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This workflow will do a clean install of node dependencies, cache/restore them, 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: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
lint:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
env:
CACHE_KEY: npm-cache-key-node-v${{ matrix.node-version }}
- run: npm i
- run: npm run lint
test:
needs: lint

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12, 14, 16]
# https://github.com/actions/setup-node#supported-version-syntax

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
env:
CACHE_KEY: npm-cache-key-node-v${{ matrix.node-version }}
- run: npm i
- run: npm test -- --ci --runInBand --reporters=default --reporters=jest-junit
env:
JEST_JUNIT_OUTPUT_NAME: results.xml
JEST_JUNIT_OUTPUT_DIR: reports/jest-node${{ matrix.node-version }}

0 comments on commit aa281e7

Please sign in to comment.